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.

Runtime TypeError getBigUint64 is not a function using Safari 14

See original GitHub issue

Hi @timostamm, I have recently updated to Safari 14 and noticed the following error in my application which appears to be coming from the runtime. https://github.com/timostamm/protobuf-ts/blob/72866167d93aa0471da25dc82475014465a08847/packages/runtime/src/pb-long.ts#L159

Unhandled Promise Rejection: TypeError: O.getBigUint64 is not a function. (In 'O.getBigUint64(0,!0)', 'O.getBigUint64' is undefined)

Surprisingly, I didnt see this error in Safari 13, despite this method apparently not being supported. Im guessing the error was silently ignored?

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView#Browser_compatibility

I did find some discussion on this topic already and it looks like it wouldnt be too bad to write a polyfill using JSBI.

System information

  • macOS: 10.15.7
  • Safari: Version 14.0 (15610.1.28.1.9, 15610)

Let me know if there is any other information I can provide! Thanks again for putting together this project!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
timostammcommented, Nov 13, 2020

Thank you both for the details! This is fixed in release v1.0.8.

Safari 14 adds the BigInt constructor function, but it does not implement the DataView BigInt methods.

The fixed code if all necessary BigInt features are present.

When running bigint code in Safari, the following error is raised: image

0reactions
pedelmancommented, Nov 13, 2020

Thanks @timostamm!! Appreciate it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Safari Technology Preview Release Notes - Apple Developer
If you already have Safari Technology Preview installed, you can update in the Software Update pane of System Preferences on macOS Monterey, or...
Read more >
Check-in [ca63a1be] - SQLite
Many hyperlinks are disabled. Use anonymous login to enable hyperlinks. Overview. Comment: Merge the latest trunk enhancements into the wal2 branch.
Read more >
SQLite: Check-in [98f954942a] - Hwaci
If this is # not supplied and the code has a main(), it is called as part of ... `sqlite3-api-glue.js`\ Invokes functionality exposed...
Read more >
DataView.prototype.setBigUint64() - JavaScript | MDN
The setBigUint64() method stores an unsigned 64-bit integer (unsigned long long) value at the specified byte offset from the start of the DataView....
Read more >
Impatient Js Preview Book | PDF | Computer Programming - Scribd
This book or any portion thereof may not be reproduced or used in ... Whether or not the function call in line A...
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