Cannot refresh browser for new version of react app - reactjs

I try to refresh react app on browser side for new version with this line of javascript :
window.location.reload(true);
It doesn't work on desktop and android Chrome, which seems to keep displaying the cached version it has.

Related

react-scrollspy-nav causes error after deploying react app

I want to active menu on scroll in my react app. I have used a react-scrollspy-nav for this functionality. It works fine when i run it on local server but when i deploy so it shows a blank screen
i have used a react-scrollspy-nav in my app, which is working perfectly on local server on my laptop but after deploying on netlify, it shows blank screen with an error on console that says
Uncaught TypeError: Super expression must either be null or a function
at ScrollspyNav.js:423:1
Link of my react app
If i remove this module react-scrollspy-nav and deploy it, my app does not show blank screen and works well but without the functionality of scrollspy which i want in my app

Next.js - using cached files on a live server breaks the app

I am just starting with Next.js and have this weird issue and not sure what is the root cause.
I am building a package that has this var
const bar = typeof window !== "undefined" ? "foo" : undefined;
I also have a next.js app that uses that package as a dependency. The app is hosted on a github page (github.io).
When loading the app without cache (mark "Disable cache" on chrome Network tab) the app renders as expected, i.e bar is foo. (It also works when doing hard refresh - cmd+shift+R)
But when loading the app using the cached files, bar is undefined.

White screen and rejected error in CRA app with Amplify

When I put a new react app version to production in amplify, for some users they only see a white screen and in the console I have seen the error message which said "rejected". Browser did not download my js or css files.
I'm using rtk query to cache my end point calls and service workers to enable Pwa if they may be relevant.
Thanks!

Cannot hide the URL bar in a TWA gatsby react app on Android

I have my app pushed out currently to google play. However when I download and install, the url bar still shows on the app.
Steps I've taken to solve this with no changes:
I realized I was using the upload certificate in my assetlinks.json, so I copied and pasted the app signing certificate from my google play console in it instead.
In my manifest.webmanifest file, I was using display: 'minimal-ui' in my gatsby-config.js file, so I changed it to display: 'standalone' and rebuilt the project, allowing the change to carry over to the manifest.webmanifest file.
Still no change. When I run the app in Lighthouse audit, the simulator doesn't show a URL bar, but it does on my phone when I install it. Anything else to try?

Meteor Angular, Ionic and Cordova, app in iOS simulator open to white screen

I am creating a new app with meteor angular, ionic and cordova.
I added platform iOS.
The app works perfectly fine in the browser
But when I do meteor run ios the iOS simulator opens to a white screen.
I inspected the dom in the simulator and noticed that angular has not bootstrapped.
I am using this code to bootstrap:
function onReady() {
angular.bootstrap(document, ['ConnectedCar']);
console.log('meteor is cordova');
}
if(Meteor.isCordova) {
angular.element(document).on('deviceready', onReady);
} else {
angular.element(document).ready(onReady);
}
I have placed this file in client/lib/app.js
Notice the log statement in the onReady function. It is run, so the angular bootstrap code is running.
But why is angular not working?
In my mobile-config.js I have App.accessRule('*');
In the console I do not see any errors that would signify angular not bootstrapping.
The only thing I notice is sometimes I get
WebSocket connection to 'ws://localhost:3000/sockjs/297/cku0xuqw/websocket' failed: WebSocket is closed before the connection is established.
Any idea why the app works perfectly fine in the browser, but not in the iOS simulator?

Resources