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

relay: panics due to unimplemented time in wasm #5305

Closed
dariusc93 opened this issue Apr 14, 2024 · 2 comments · Fixed by #5328
Closed

relay: panics due to unimplemented time in wasm #5305

dariusc93 opened this issue Apr 14, 2024 · 2 comments · Fixed by #5328

Comments

@dariusc93
Copy link
Member

Summary

libp2p panics in the browser with time not implemented on this platform due to unsupported time module when attempting to listen to a relay, despite enabling instant/wasm-bindgen feature explicitly in libp2p-relay module. Is it not really clear where std::time::Instant (or std::time::SystemTime) is being exposed when targeting was32-unknown-unknown.

Expected behavior

Not to panic when attempting to listen to relay

Actual behavior

Panics with time not implemented on this platform despite wasm feature being explicitly enabled

Relevant log output

No response

Possible Solution

No response

Version

0.53.2 and github at 042174e

Would you like to work on fixing this bug ?

Maybe

@dariusc93 dariusc93 changed the title relay: panics due to unsupported time module relay: panics due to unimplemented time in wasm Apr 14, 2024
@dariusc93
Copy link
Member Author

Doing a quick scan over the code, i did notice the following using std instead of the instant crate for SystemTime, although this is for the HOP protocol, so this may not be relevant but still good-to-know

use std::time::{Duration, SystemTime};
use std::time::{Duration, SystemTime};

@dariusc93
Copy link
Member Author

From testing, it looks like it is related to what is used in *_hop though I thought HOP protocol was related to the relay server. I may have it backwards in that case.

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

Successfully merging a pull request may close this issue.

1 participant