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

Error detectIncognito cannot determine the browser #46

Open
gvillo opened this issue Dec 12, 2024 · 2 comments
Open

Error detectIncognito cannot determine the browser #46

gvillo opened this issue Dec 12, 2024 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@gvillo
Copy link

gvillo commented Dec 12, 2024

Hi! I am running latest version (1.3.7) and I am getting this error in Sentry (242 Events and 76 Users affected). I have a SPA Vite (no SSR). Pretty simple, I have the vite-plugin-pwa using a simple sw too.

image

I couldn't reproduce it locally, but I think it's only on the production bundle, if it's kinda related to #44, I just post my build config from vite.config file

build: {
			outDir: 'build',
			sourcemap: true,
			minify: true,
			cssMinify: true,
			rollupOptions: {
				output: {
					manualChunks: (id) => {
						if (id.indexOf('node_modules') !== -1) {
							const basic = id.toString().split('node_modules/')[1];
							const sub1 = basic.split('/')[0];
							if (sub1 !== '.pnpm') {
								return sub1.toString();
							}
							const name2 = basic.split('/')[1];
							return name2.split('@')[name2[0] === '@' ? 1 : 0].toString();
						}
					}
				}
			}
	}

Any ideas?

@Joe12387
Copy link
Owner

I've been seeing similar messages on my side as well, but have been preoccupied. I believe this has to do with the functionality of the new and more difficult-to-evade way of detecting browser engines not accounting for old versions of browsers, particularly Safari, where either the error message of Number.prototype.toFixed is different, or where Number.prototype.toFixed is not supported. I've been considering bringing back the eval.toString() method to account for instances where Number.prototype.toFixed is not supported. Again, don't have time at the moment, but if anyone wished to investigate further & submit a PR, feel free to do so!

@Joe12387 Joe12387 added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 12, 2024
@marciopamplona
Copy link

Same issue, during the eval() under strict security context policy.

VM248:1 Uncaught EvalError: Refused to evaluate a string as JavaScript
because 'unsafe-eval' is not an allowed source of script in the following
Content Security Policy directive: "script-src 'self' _WEBSITE.COM_
https://code.jquery.com https://stackpath.bootstrapcdn.com 'unsafe-inline' _REDACTED_".

    at <anonymous>:1:1
(anonymous)	@	VM248:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants