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

LAZY_IN_SYNC: Uncaught TypeError: Cannot convert a Symbol value to a string #1510

Open
paul-marechal opened this issue May 26, 2023 · 1 comment

Comments

@paul-marechal
Copy link
Contributor

Expected Behavior

I don't expect the LAZY_IN_SYNC error to fail when displaying symbols.

Current Behavior

LAZY_IN_SYNC fails to display symbols.

Possible Solution

Call .toString() explicitly before printing the symbol.

Steps to Reproduce (for bugs)

  1. Create a binding resolving to a promise.
  2. Resolve said binding synchronously.

Context

We recently migrated to Inversify 6 and had to deal with this error.

Your Environment

  • Version used: 6.0.1
  • Environment name and version (e.g. Chrome 39, node.js 5.4): Firefox 113.0.2 (64-bit)
  • Operating System and version (desktop or mobile): Windows 10
  • Link to your project: https://github.com/eclipse-theia/theia
@paul-marechal
Copy link
Contributor Author

Maybe a different issue but I had this problem while dealing with this error: What's the recommended way to troubleshoot which binding is causing the sync resolution to fail? I ended up editing Inversify's sources in my node modules to print what service identifier caused resolvedRequests.isAsync to become true but that feels like a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant