pwa-module icon indicating copy to clipboard operation
pwa-module copied to clipboard

Infinite loading

Open simplenotezy opened this issue 4 years ago • 0 comments

I discovered something peculiar after debugging an issue related to infinite loading after 4 refreshes.

The problem After starting the dev server using npm run dev and refreshing the website exactly 4 times it would end up loading infinitely. It would stop at the "fetching document" in the network tab.

Even if you closed the tab and opened the window again, it would keep loading. Making it seem like a browser related issue.

The workaround Opening a browser in incognito mode would solve the issue. However, after 4 refreshes it would happen again, but then the solution would be to close that incognito mode, and open a new one.

The solution I discovered that we had the following config:

pwa: {
	workbox:{
		dev: !process.argv.includes('generate') && process.env.APP_ENV === 'local', // this line
		importScripts: [],
	}
},

I noticed that the dev property was not documented in your documentation. When I removed that config key, the issue would no longer occur.

I thought it post it here, because perhaps it reveals a bigger issue in the code.

simplenotezy avatar Nov 01 '21 14:11 simplenotezy