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

Observer onStart Not Called #2

Open
allenwyma opened this issue Mar 15, 2020 · 4 comments
Open

Observer onStart Not Called #2

allenwyma opened this issue Mar 15, 2020 · 4 comments

Comments

@allenwyma
Copy link

Hi Josh,

Love the plugin; using it now.

I have some users with some flaky connections (I believe), and I was trying to test if I turn off data and turn back on data, to just do a pull of latest data through graphql (since we can't get an update of the data through subscribing on a subscription), and I'm not seeing that Observer.onStart is ever called.

I also looked through the source code and I didn't see onStart ever being called, am I going crazy or is this a possible bug?

@MrToshio
Copy link

hello @HangingClowns ,

Could you please share an exemple of usage of this package? I keep getting errors and it really do start to drive me nuts :p

@allenwyma
Copy link
Author

What errors are you getting?

I've decided to switch to using phoenix_wings directly for 3 reasons:

  1. This library probably needs to be updated (I'm okay to do that, but I believe this library is not being maintained at this moment, so even if I update the library, it will probably not be updated in pub.dev).
  2. Subscriptions, as far as I understand, do not give you any initial data, which I can do upon connection of a Phoenix socket to a channel.
  3. If I need to bring in a special library just to do subscriptions, then I might as well as just use phoenix_wings directly, since this library relies on phoenix_wings.

@MrToshio
Copy link

MrToshio commented May 27, 2020

I understand, i fixed my issue by indeed updating the dependencies of this project to phoenix_wings: ^0.2.1 . Afterwards my socket would return me many times the same object and it was because i did not add the socket in the initState() but in the build of my widget. Might seems like stupid mistakes but as i start with flutter and dart it took me a lot of time to figure that out to get it working but now i'm happy to say it works. My last issue is that websocket stop to listen when i go to another app and then come back to mine but i'll probably find a way in the near future :P thank you for your help!

@MrToshio
Copy link

Also i tried to push a fix to this package but i do not have the right, if dailydrip could give me push right i could send a PR 👍

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

2 participants