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

Safari raises SyntaxError: The string did not match the expected pattern. #8347

Closed
mottox2 opened this issue Aug 13, 2019 · 2 comments · Fixed by #8348
Closed

Safari raises SyntaxError: The string did not match the expected pattern. #8347

mottox2 opened this issue Aug 13, 2019 · 2 comments · Fixed by #8348
Assignees
Milestone

Comments

@mottox2
Copy link
Contributor

mottox2 commented Aug 13, 2019

Bug report

Describe the bug

My app of next@9.0.4-canary.3 raise error in safari.

main.js

function markHydrateComplete() {
  if (!_utils.SUPPORTS_PERFORMANCE_USER_TIMING) return;
  performance.mark('afterHydrate'); // mark end of hydration

  performance.measure('Next.js-before-hydration', null, 'beforeRender');
  // => SyntaxError: The string did not match the expected pattern.
  performance.measure('Next.js-hydration', 'beforeRender', 'afterHydrate');
  clearMarks();
}

it seems that safari doesn't exec with second args.

スクリーンショット 2019-08-13 20 20 08

To Reproduce

  1. Create next app
  2. Upgrade next to 9.0.4-canary.3
  3. Start dev server
  4. Open broswer

Expected behavior

Safari does not raise a error.

Screenshots

スクリーンショット 2019-08-13 20 18 31

System information

  • OS: macOS 10.14.4
  • Browser (if applies): Safari 12.1
  • Version of Next.js: 9.0.4-canary.3
@developit
Copy link
Contributor

developit commented Aug 13, 2019

Safari doesn't seem to allow null, so we should explicitly pass navigationStart:

performance.measure('Next.js-before-hydration', 'navigationStart', 'beforeRender');

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants