Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not loading for Safari or FireFox #6

Open
calstu99 opened this issue Sep 6, 2020 · 1 comment
Open

Not loading for Safari or FireFox #6

calstu99 opened this issue Sep 6, 2020 · 1 comment

Comments

@calstu99
Copy link

calstu99 commented Sep 6, 2020

Boilerplate is not loading for Safari/FireFox. Works only with Chrome.
After $npm install and $npm start:

Safari Error:
TypeError: services__WEBPACK_IMPORTED_MODULE_4_["accountService"].refreshToken()["finally"] is not a function. (In 'services__WEBPACK_IMPORTED_MODULE_4_["accountService"].refreshToken()"finally"', 'services__WEBPACK_IMPORTED_MODULE_4_["accountService"].refreshToken()["finally"]' is undefined)

FireFox Error:
[14:45:42.900] The connection to ws://localhost:8080/sockjs-node/610/emmylzf3/websocket was interrupted while the page was loading. @ http://localhost:8080/main.js:7128

@calstu99
Copy link
Author

Great boilerplate! However currently only runs in Chrome.

For it to work in Safari/FireFox, need to disable ".Finally" and use ".then" to handle asynchronous call from backend service (refreshToken()).

//accountService.refreshToken().finally(startApp); //original
//accountService.refreshToken().then(startApp); //new

startApp(); // remove refreshToken() for mobile to work.

May need to rewrite using asynchronous call.. ie. wrapped in try catch after resolving or rejection for this to work in Safari/Firefox. Could be a bug with bundler or in Safari/Firefox

(async () => {
try {
// do something
} catch (error) {
console.log(error);
} finally {
// render App

}  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant