question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Safari 10 Support

See original GitHub issue

Do we want to support Safari 10? This browser is end-of-life but seems to still have a decent number of active users.

We’ve had at least two issues crop up about it (I’ve seen more that I don’t have on hand): Fixes https://github.com/zeit/next.js/issues/9782 Fixes https://github.com/zeit/next.js/issues/9827

This is due to Safari 10 incorrectly implementing URL, so Next.js wont work even if users polyfill support back. As a result, client-side transitions try to happen via server-side and fail:

image

Correct behavior (Safari 11+): image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:49 (16 by maintainers)

github_iconTop GitHub Comments

18reactions
timneutkenscommented, Jan 27, 2020

This issue is solved in 9.2.1

9reactions
tpreussecommented, Apr 4, 2020

We also got reports about broken links again from users with old iOS and Android versions.

The problem seems to be that native-url returns a protocol on those devices even when it shouldn’t. Probably a problem that only occurs in combination with the url-polyfill and maybe even then with certain browser engine version only.

@olpeh I used a ultima ratio solution for now and disabled native-url via next.config.js:

module.exports = {
  webpack: config => {
    const alias = { ...config.resolve.alias }
    delete alias.url // alias to native-url
    config.resolve = {
      ...config.resolve,
      alias
    }
    return config
  }
}

(by doing that you’ll also loose the 7kb optimisation of native-url on all platforms)

Specifically broken were: iOS 9.3 (reproduced in Simulator), Android 6 (only reported, not reproduced)

@Timer would you like to see the root issue solved in native-url/url-polyfill or could you also imagine adapting the protocol check in the router? https://github.com/zeit/next.js/blob/b274fe39d38111588e625342a89dc568ad38fff5/packages/next/next-server/lib/router/router.ts#L395-L404

(e.g. doing a string check on the unparsed url like url.match(/^[a-z]+:/))

The «not returning a protocol» logic of native-url is quite convoluted 🙈 https://github.com/GoogleChromeLabs/native-url/blob/19aacc0a82f7e36995bde6adc6876f6140d6d06a/src/parse.js#L95-L126 So wouldn’t be surprised if more accidental protocol returns happen down the line.

Read more comments on GitHub >

github_iconTop Results From Across the Web

About the security content of Safari 10 - Apple Support
Apple security documents reference vulnerabilities by CVE-ID when possible. Safari 10. Released September 20, 2016. Safari Reader. Available for ...
Read more >
Download Apple Safari - Apple - Support - Downloads
Browse Downloads by Product ; Get the latest version of Safari. Mar 20, 2015 ; Safari 5.1.10 for OS X Snow Leopard includes...
Read more >
Update to the latest version of Safari - Apple Support
If a Safari update is available for your device, you can get it by updating or upgrading macOS, iOS, or iPadOS.
Read more >
Safari - Official Apple Support
Learn more about all the topics, resources, and contact options you need to download, update and manage your Safari settings.
Read more >
About the security content of Safari 10.0.2 - Apple Support
This document describes the security content of Safari 10.0.2.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found