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

fcl-dev-wallet integration with user managed emulator not working #72

Closed
bartolomej opened this issue Dec 21, 2021 · 5 comments
Closed
Assignees
Labels
bug Something isn't working feedback prio-high high priority

Comments

@bartolomej
Copy link
Member

Describe the bug
Feedback from Flow team:

The default emulator doesn’t show any data, and the wallet doesn’t work. I had to add a custom emulator from the home page. It may be related to this issue: #23

@bartolomej bartolomej added bug Something isn't working feedback labels Dec 21, 2021
@bartolomej bartolomej self-assigned this Dec 21, 2021
@bartolomej bartolomej added the prio-high high priority label Dec 21, 2021
@bartolomej
Copy link
Member Author

bartolomej commented Dec 31, 2021

Currently there is no way to make dev-wallet work with flowser and user managed emulators, because the former run on port A and latter run on some other port B.

dev-wallet requires us to define FLOW_ACCESS_NODE at build time, (see https://github.com/onflowser/flowser/blob/master/docker-compose.yml#L84), so here is no way to dynamically change access node url (e.g, from http://localhost:8080 - flowser managed emulator to http://localhost:8081 - user managed emulator).

One possible solution would be to add this functionality to dev-wallet.

@bartolomej
Copy link
Member Author

bartolomej commented Dec 31, 2021

I added a info prompt with simple instructions for how to connect flowser to default emulator (fixed in d838360):

Screenshot 2022-01-04 at 22 36 12

@psiemens
Copy link

psiemens commented Jan 6, 2022

dev-wallet requires us to define FLOW_ACCESS_NODE at build time, (see https://github.com/onflowser/flowser/blob/master/docker-compose.yml#L87), tso here is no way to dynamically change access node url (e,g, from http://localhost:8080 - flowser managed emulator to http://localhost:8081 - user managed emulator).

I just want to make sure I'm understanding the problem correctly. Is this right?

  • Flowser always launches an emulator instance alongside the main app. This emulator runs at the default port 8080
  • If a user runs an emulator instance outside of Flowser without changing the config (e.g. flow emulator start), the default port will clash with the instance that Flowser is running
  • However, Flowser will connect to an external (user managed) emulator on port 8081, but only if it is running
  • The dev wallet is configured in docker-compose.yml when Flowser launches, so there's no way to redirect the dev wallet at port 8081 once Flowser detects an emulator running there

@bartolomej
Copy link
Member Author

@psiemens

Flowser always launches an emulator instance alongside the main app. This emulator runs at the default port 8080

Yes, Flowser exposes (allocates) the default emulator ports (http=8080, rpc=3569), defined here.

If a user runs an emulator instance outside of Flowser without changing the config (e.g. flow emulator start), the default port will clash with the instance that Flowser is running

That's true. This will happen even if the emulator that is managed by Flowser is not running, because docker allocates port resources when containers are started.

However, Flowser will connect to an external (user managed) emulator on port 8081, but only if it is running

Also true, Flowser will connect to a predefined "user emulator" port, that is set with env variable USER_MANAGED_EMULATOR_PORT, but could also be defined at run-time by the user himself (e.g. through some in app setting). Here is the code block that handles user managed emulator port setting.

The dev wallet is configured in docker-compose.yml when Flowser launches, so there's no way to redirect the dev wallet at port 8081 once Flowser detects an emulator running there

Yep, thats exactly right. Thats the core of this issue.

@bartolomej bartolomej changed the title Integration with user managed emulator not working dev-wallet integration with user managed emulator not working Jan 23, 2022
@bartolomej bartolomej changed the title dev-wallet integration with user managed emulator not working fcl-dev-wallet integration with user managed emulator not working Feb 6, 2022
@bartolomej
Copy link
Member Author

Closing this since we completely rewrote that logic in https://github.com/onflowser/flowser/releases/tag/v2.0.0-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feedback prio-high high priority
Projects
None yet
Development

No branches or pull requests

2 participants