Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Bug in @solana/errors #2903

Closed
lukecaan opened this issue Jul 2, 2024 · 4 comments
Closed

Bug in @solana/errors #2903

lukecaan opened this issue Jul 2, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lukecaan
Copy link
Contributor

lukecaan commented Jul 2, 2024

Tldr; a bad regex string in @solana/errors is makes old (<16.4) iOS browsers crash

..

Hi, the same issue which was reported here #2745, and ended up being fixed here https://github.com/solana-labs/solana-web3.js/pull/2785/files is rearing its head again.

The issue this time appears to be @solana/errors, which is a nested dependency of @solana/spl-token > @solana/spl-token-metadata > @solana/solana-codecs > @solana/solana/errors

It looks like the latest version of the code in packages/errors should actually be fine - but if you pull the latest bundled code from npm it is still using the broken version of getHumanReadableErrorMessage

image

^ The negative lookbehind regex is the problem. You can see the broken version of the method in the npm bundled code if you go here https://www.npmjs.com/package/@solana/errors/v/2.0.0-preview.3?activeTab=code and look insidedist/cli.js

I think doing a few fresh releases making things look at newer package versions will fix it

cc @steveluscher

@lukecaan lukecaan added the bug Something isn't working label Jul 2, 2024
@steveluscher
Copy link
Contributor

Super coincidence, but we're doing a release of TP4 today!

@steveluscher
Copy link
Contributor

@lukecaan
Copy link
Contributor Author

lukecaan commented Jul 3, 2024

@steveluscher thank you! 🙌

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants