I have a PHP app and I'm trying to use it with GraphQL and Relay, but trying to get Relay working I keep getting this error in my Browser (Chrome and Safari)
warning.js:36 Warning: Relay relies on polyfills for ES6 features in older browsers. Babel provides a good one: https://babeljs.io/docs/usage/polyfill/
I've tried all sorts of things, and I can't seem to get it to work.
Change webpack configuration, include the polyfill.js as a script.
I can't ignore that warning, because later on I will get:
RelayTaskQueue.js:97 Uncaught TypeError: _promise2.default is not a constructor
I managed to fix the problem myself. The problem was that I was running on Mac OS X with a case insensitive file system.
I tried creating a disk image with case sensitivity, and it worked. Followed instructions here. https://gist.github.com/dixson3/8360571 #
Related
Problem Description
In our Angular 8 project, some of the routes are loaded lazily using the following syntax
{
path: "/bread",
loadChildren: () => import('./bread/bread.module')
.then(m => m.BreadModule)
}
All routes work very fine in almost all Desktop and Android devices browsers - including macOS Safari - (a list of tested working environments below), but some of the lazy-loaded routes are failing when tested on IOS devices. When trying to access these routes, whether programmatically or by manually setting the URL of the browser, the following error shows on the console :
ERROR ERROR Error: Uncaught (in promise): Error: Loading chunk 5 failed.
(missing: https://192.168.220.128/ui/5.962e65be9c4b000c89f6.js)
a#https://192.168.220.128/ui/runtime.b5d7c083c76af74c6510.js:1:1269
P#https://192.168.220.128/ui/polyfills.27aa9b55940b8e5475a1.js:1:18520
onInvokeTask#https://192.168.220.128/ui/main.1b4a84881faf77e4effa.js:1:144508
https://192.168.220.128/ui/polyfills.27aa9b55940b8e5475a1.js:1:3483
https://192.168.220.128/ui/polyfills.27aa9b55940b8e5475a1.js:1:9381
y#https://192.168.220.128/ui/polyfills.27aa9b55940b8e5475a1.js:1:22586
_#https://192.168.220.128/ui/polyfills.27aa9b55940b8e5475a1.js:1:22811
Tried solutions
Here's a list of the solutions we tried but in vain:
Adding a global ExceptionHandler that detects the error and forces the website to reload. It keeps reloading forever.
Hard-resetting the broswer. Actually we are using Lampdatest Realtime Broswer testing and everytime a new test starts, the browser is clean.
Some hacks, like scratching heads, drinking more coffee and redirecting to a buffer page that then redirects to the actual route.
Some solutions we didn't/couldn't try/implement due to some limitations
Anything PWA
Preloading modules
Not using lazy-loading (actually this ruins performance and still shows other wicked errors on iOS)
Working environments
Chrome (Windows - Linux - macOS - Android)
Firefox (Windows - Linux - Android)
Edge
IE11
Safari on macOS
Failing environments
Safari on iOS (tried on a device and using Lambdatest Realtime browser testing)
Chrome on iOS (tried using Lambdatest Realtime browser testing)
FF on iOS (tried using Lambdatest Realtime browser testing)
Some files/logs that may help
Angular tools version : https://pastebin.com/Q5MpRvxV
Broswerslist : https://pastebin.com/Uasz4YXf
package.json : https://pastebin.com/UQMM2jKv
angular.json : https://pastebin.com/JeBQUmeQ
Found the solution, It was a piece of code I've written before that is not supported in macOS, which is Positive Lookahead and Lookbehind in RegExp.
In the Rest Webservice Command, I don't see any option to pass a variable in the URI.
We do not want to hard the end point in the script.
As an e.g I will want the script to use different points for dev/stage and prod.
Is there a work around for this.
On building a URI with variables like :
https://$v_hostname$/test-rs-v1/employee/data send request works fine but
bot runs we get an error stating :
Hostname could not be parsed.
Update: That was a bug and fixed on version 11.3.1. You can only achieve that on version 11.3.1 or later.
Reference: https://docs.automationanywhere.com/bundle/enterprise-v11.3/page/topics/release-notes/release-notes-11-3-1.html
Workaround for older versions (If you have experience with C#): Build and test DLLs
The following applies only on version 11.3.1 and later.
Make sure that $v_hostname$ contains a value at the run time, using debugging option or message box command.
I did reproduce the same error by entering a variable that doesn't exist or doesn't have a value, there is no another scenario would reproduce "Hostname could not be parsed".
If the hostname/URL is invalid you will get "The remote name could not be resolved:".
I've tested the REST Web Service command on both community and enterprise editions, and it's working very well.
I have a strange situation with a project for iOS.
Its created using browserify and React for Cordova and aimed at iOS.
We have built the project for iOS using Cordova commands without any issues. It runs with no xcode errors or Javascript errors either however none of the JS ui appears on screen. We just get a blank white screen with the system bar at the top. See attached screen shot.
So far we have found out that if you add HTML to the index.html in WWW folder it prints that fine so I assume its the JS.
When we run in a browser it works as well as building for Android.
We have no problems with anything other than iOS (simulator and device build).
hopefully someone can help me out here because I'm stumped. Please let me know what files you need to look at and I'll make them available.
Thanks in advance.
IMAGES
The error screen: http://www.voidapplications.co.uk/errorScreen.png
What we expect to be shown: http://www.voidapplications.co.uk/whatWeExpect.png
If you are using internationalization component that's because you need to use the Intl polyfill:
Intl.js and FT Polyfill Service
Intl.js polyfill was recently added to the Polyfill service, which is developed and maintained by a community of contributors led by a team at the Financial Times. It is available thru cdn.polyfill.io domain, which routes traffic through Fastly, which makes it available with global high availability and superb performance no matter where your users are.
To use the Intl polyfill thru the Polyfill service just add one script tag in your page before you load or parse your own JavaScript:
<script src="https://cdn.polyfill.io/v1/polyfill.min.jsfeatures=Intl.~locale.en"></script>
When specifying the features to use thru the polyfill service, you have to specify what locale, or locales to load along with the Intl polyfill for the page to function, in the example above we are specifying Intl.~locale.en, which means only en, but you could do something like this:
<script src="https://cdn.polyfill.io/v1/polyfill.min.js?features=Intl.~locale.fr,Intl.~locale.pt"></script>
note: the example above will load the polyfill with two locale data set, fr and pt.
This is by far the best option to use the Intl polyfill since it will only load the polyfill code and the corresponding locale data when it is really needed (e.g.: safari will get the code and patch the runtime while chrome will get an empty script tag).
source & other ways to include Intl polyfill: https://github.com/andyearnshaw/Intl.js#getting-started
You can debug the UIWebView in the simulator with Safari http://moduscreate.com/enable-remote-web-inspector-in-ios-6/. You'll probably see a big error message in the console, if not you will have access to the debugger so you can step through and sort it out.
I have had this issue in the past, it turned out to be unsupported javascript features. for example, setting default parameters in the function. I.e:
function test( myvalue=0 ) { /* ... */ };
I had to initialise the value inside the function instead. You could also try removing any ecma script 2016 features you may have implemented.
Trouble shooting this type of issue was painful. I created a minimal version of the smallest part of my product compiled and ran it on ios emulator, added another chunk of the product, rinse and repeat.
Im sure there's a better way to detect these issues, but I do not know it.
I have a new ubuntu server running HHVM that I just installed my PHP application on. Everything seems to work fine except one aspect.
I have a button that queries an external e-mail box, and downloads the attachments to the server, however when I run that function I get:
Fatal error: Call to undefined function imap_sort()
I know there's usually a module for it, but I don't know how to check for it on this setup.
Any help is appreciated.
The HHVM documentation for imap_sort very loudly proclaims
NOT SUPPORTED IN HHVM
so no, HHVM does not currently support this function.
Dartium raises a "Not Supported" exception when calling Element.animate(), and Chrome, via dart2js, doesn't do anything at all.
Web Animations via JavaScript work completely fine in the aforementioned browsers.
Does Dart actually support Web Animations?
There seems to be a bug in the Element.animate API. It looks like the problem is that it takes Map arguments, and it's not being correctly converted, so in dart2js we're passing a Dart LinkedHashMap to JS, and it doesn't understand it. So it's just a matter of convincing the generation script to add the right type conversions. At least for dart2js, I haven't yet investigated Dartium.
I get Exception: Unsupported operation: [info: ../../third_party/WebKit/Source/bindings/core/dart/custom/DartElementCustom.cpp:100] even with an example that worked months ago.
Please create a bug report.