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.

[Next 9.5.4] Symbol.prototype.description polyfill raises TypeError

See original GitHub issue

Bug report

Describe the bug

The Symbol.prototype.description polyfill raises TypeError in Safari 11 or any other browser that does not support Symbol.prototype.description natively.

To Reproduce

  1. Open a web page that runs on Next.js 9.5.4 or 9.5.5 (https://nextjs.org is handy, or you can set up a starter app locally: npx create-next-app nextjs-blog --use-npm --example "https://github.com/vercel/next-learn-starter/tree/a24ee6c823/learn-starter" && cd nextjs-blog && npm install next@9.5.4 && npm run dev)
  2. Open developer tools
  3. Enter Symbol.iterator.description in the console
  4. TypeError: Cannot convert a symbol to a string is raised

Expected behavior

Symbol.iterator.description === 'Symbol.iterator'

Screenshots

Screenshot 2020-10-13 2 56 59

System information

  • OS: iOS 11.4
  • Browser: Mobile Safari 11
  • Version of Next.js: 9.5.4-9.5.5
  • Version of Node.js: 12.10.0

Additional context

https://github.com/vercel/next.js/blob/1c4aecbeaf9de44cec3484f76d23ec8103f3bc50/packages/next-polyfill-module/src/index.js#L32-L38

/\((.+)\)/.exec(this)[1] will not work on any browser as RegExp.prototype.exec is spec’d to convert the argument to a string with the abstract operation ToString and ToString(symbol) throws a TypeError exception. See https://tc39.es/ecma262/#sec-regexp.prototype.exec and https://tc39.es/ecma262/#sec-tostring .

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
prettyboyweiweicommented, Oct 23, 2020

+1 “next”: “^9.5” => “next”: “9.5.3”

0reactions
balazsorban44commented, Jan 29, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symbol.prototype.description - JavaScript - MDN Web Docs
The read-only description property is a string returning the optional description of Symbol objects.
Read more >
Symbol.prototype [ @@toPrimitive ] TypeError when deploying ...
Hi, I am trying to get a cloud function to run on GCP with an auto-generated GraphQL SDK from https://graphql-code-generator.com/.
Read more >
Changelog - Cypress Documentation
When a chromium based browser tab or process crashes, Cypress will no longer hang indefinitely but will fail the current test and move...
Read more >
symbol.prototype.description - npm
This package implements the es-shim API interface. It works in an ES6-supported environment and complies with the spec. Most common usage: var ...
Read more >
Symbol.prototype Comparison Error - javascript - Stack Overflow
Because performing == (sloppy) comparison tries to convert Symbol.prototype to primitive value using @@toPrimitive but this will work only ...
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