React weird Firefox error - reactjs

I've a react app and I'm getting this TypeError in Firefox, latest version, on chrome and safari it works fine.
message: "t.linkNamed(...).fetch(...).then(...).finally is not a function"
stack: "[1017]/h</t.prototype._fetch....."
I tried to debug it without much success. Any ideas?

Notice that fetch is supported on Chrome before it has been supported in your firefox . So it seems you are not using the native fetch . Even though, the response streaming is only supported on Chrome :
So you have two options:
Either add a polyfill for fetch.
Or migrate to another http client.
REFERENCE: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

Related

Why is a URL not fetching in my React app

In my React app I am making a simple fetch request:
useEffect(() => {
fetch('http://localhost:3000/').then((response) => console.log('foobar', response));
}, []);
This works fine. But when I try this with my real url like https://my-site.com/abc/token it doesn't work? When I try to fetch a different domain it doesn't work?
What could be the issue and how do I solve this?
Not many details in the post but I'll give it a go.
If you are receiving an error whilst in development similar to the one pictured below, then it means the server you are trying to contact does not allow the host you are developing on. This can be fixed either by either changing the security settings of your browser or installing a plugin that disables CORS.
However, if you are receiving this error in a non-local environment, then it means you should add the hostname of your frontend into the Access-Control-Allow-Origin on the serverside (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin).
Links for more details
Disable CORS in Chrome + Safari and the plugin for Firefox - https://medium.com/swlh/avoiding-cors-errors-on-localhost-in-2020-5a656ed8cefa
Plugin for Chrome - Why does my http://localhost CORS origin not work?

React. IE11 requests being blocked

Im testing my react app in IE11 but all the requests I make to my server are blocked.
SCRIPT7002: XMLHTTPRequest: Network error 0x2efd, Couldnt complete the operation due a 00002efd error.
This happens when i try to do a post in a form.
Only happens in IE11.
I have already added IE11 Support adding this in index.tsx
import "react-app-polyfill/ie11";
I have already disabled browsers protected mode.
The issue was with IE11 being unable to read 3** codes. I had to chenge them all to 2**

ERROR: Firebase Database (${JSCORE_VERSION}) INTERNAL ASSERT FAILED: Reference.ts has not been loaded

I get error message when I am loading my Webapp with IE10 and below IE version.
I am building an my Webapp with React 15.4.0 and firebase 5.5.0.
I have tested the Webapp with Chrome, Firefox, IE11 and it's working fine.
Try to comment line below in file "firebase-js-sdk/src/database/api/Query.ts" may help you to solve this error.
assert(__referenceConstructor, 'Reference.ts has not been loaded');
Other work around are also available in link below that you can try to check.
Firebase Database (4.3.1) INTERNET ASSERT FAILED: Reference.ts has not been loaded.

For my Angular 2 app in Safari my app doesn't show, just has a blue screen

For my Angular 2 app in Safari my app doesn't show, just has a blue screen
My app works fine in firefox, chrome and ie.
I get this error in the console for the new safari script fix for es6:
Refused to execute script from 'https://gist.githubusercontent.com/paulirish/1579671/raw/682e5c880c92b445650c4880a6bf9f3897ec1c5b/rAF.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
This is my es6 script version:
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
This is the error I see in the console for Safari?
Could it be a es6 javascript error?
Seems you need to add this polyfill https://gist.github.com/paulirish/1579671
See also Angular2 app works in Chrome and IE, but not Firefox or Safari

Website not running on Chrome and Firefox

I use data from localhost and REST API in my website. My website run properly on IE but in Chrome and Firefox CROS origin related problem occurs. I use Angular.js to create website. Please suggest how to solve these problem.
In Chrome above problem is solved by adding "allow cross origin *" extension.

Resources