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

Calling sleep() causes TypeError: can't convert null to BigInt #134

Open
ShonFrazier opened this issue Jul 20, 2021 · 0 comments
Open

Calling sleep() causes TypeError: can't convert null to BigInt #134

ShonFrazier opened this issue Jul 20, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@ShonFrazier
Copy link

ShonFrazier commented Jul 20, 2021

Title says it. Code:

import Foundation
import JavaScriptKit

print("Before sleep()")
sleep(1000) // wasm bails out
print("After sleep()") // Never happens

Project for the above code: https://github.com/ShonFrazier/swiftwasmsleep

The full error is:

 TypeError: can't convert null to BigInt
     poll_oneoff webpack:///./node_modules/@wasmer/wasi/lib/index.esm.js?:128
     start webpack:///./node_modules/@wasmer/wasi/lib/index.esm.js?:131
     startWasiTask webpack:///./entrypoint/dev.js?:92
     async* webpack:///./entrypoint/dev.js?:103
     js http://127.0.0.1:8181/dev.js:97
     __webpack_require__ http://127.0.0.1:8181/dev.js:20
     <anonymous> http://127.0.0.1:8181/dev.js:84
     <anonymous> http://127.0.0.1:8181/dev.js:87
 dev.js:96:11
     handleError webpack:///./entrypoint/dev.js?:96
     (Async: promise callback)
     <anonymous> webpack:///./entrypoint/dev.js?:103
     js http://127.0.0.1:8181/dev.js:97
     __webpack_require__ http://127.0.0.1:8181/dev.js:20
     <anonymous> http://127.0.0.1:8181/dev.js:84
     <anonymous> http://127.0.0.1:8181/dev.js:87
@kateinoigakukun kateinoigakukun added the bug Something isn't working label Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants