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

Snapd exception shown when connection timeout #1479

Closed
tim-hm opened this issue Nov 1, 2023 · 13 comments
Closed

Snapd exception shown when connection timeout #1479

tim-hm opened this issue Nov 1, 2023 · 13 comments
Labels

Comments

@tim-hm
Copy link

tim-hm commented Nov 1, 2023

When trying to browse the app center without an internet connection this error was surfaced. We should fail more gracefully here.

@anasereijo @d-loose

SCR-20231101-spgu
@dishankjindal1
Copy link

Hi @BLKKKBVSIK - I would like to pick up the issue and give it a try. Can you give me hint on where should I look for this issue? And how do I emulate it?

@BLKKKBVSIK
Copy link
Collaborator

Hi @dishankjindal1

You simply have to run the project without being connected to internet.
One good way to fix it, is to catch this error and display a generic text like "No connection or couldn't connect"
Don't hesitate if you need more instructions.

@anasereijo
Copy link
Collaborator

@BLKKKBVSIK After getting connection back, will users need to reload the app, or will it update automatically?

@anasereijo
Copy link
Collaborator

For copy, I think it should read - We can't load content in the App Center without an internet connection.

One cool thing we could do is to use the animated icon as suggested here :)

Thanks for your help @dishankjindal1 !

@BLKKKBVSIK
Copy link
Collaborator

@BLKKKBVSIK After getting connection back, will users need to reload the app, or will it update automatically?

For now, the user will need to reload the tab at least. But in the case where the device has no internet connection, we could refresh it automatically in a second time.

@tim-hm
Copy link
Author

tim-hm commented Dec 13, 2023

When offline, we could show a modal or screen to prevent users from interacting with the app. This avoids the complexities of handling numerous corner cases that arise when users navigate the app without an internet connection. The modal could include a 'retry' button and perform periodic connectivity checks, effectively freezing the app until internet is available.

A con of this approach is that some functionaltiy might be fine offline (eg uninstall). But I think to really 'solve' this we'd need to do a bigger piece of work thinking through what offline mode looks like and so I think the simpler approach for now is better.

@anasereijo
Copy link
Collaborator

anasereijo commented Dec 13, 2023

Could we have two solutions for two different scenarios?

a) user is using the app and then the internet disconnects:

I think we should show an error message within the page they had opened:

We can't load content in the App Center without an internet connection.
Check your connection and reload.
[Retry]

this way, once the connection is back, the user will see the page they were looking at before, or the page they were trying to open, so they don't lose the 'flow'.

b) user is offline and tries to open the app

have @tim-hm's approach of having a modal preventing users from interacting with the app. the window will be empty (dark or light depending on the user's theme)

Unable to connect to the App Center
Check your connection and reload.
[Retry]

some inspiration:
Screenshot 2023-12-13 at 12 03 10

Screenshot 2023-12-13 at 12 03 25

@kenvandine
Copy link
Member

kenvandine commented Dec 13, 2023 via email

@dishankjindal1
Copy link

Hey, I am having trouble setting up the environment.

Can you give me detailed steps? Sorry, but i tried to do it myself and i need assistance now.

Currently i have macbook pro m2, and i installed UTM virtual machine and installed ubuntu 22LTS on it.

@tim-hm
Copy link
Author

tim-hm commented Dec 13, 2023

@dishankjindal1 have you tried the steps in contributing.md?

In the past I've found running these apps in an apple silicon VM tricky but hopefully the experience has improved 🤞

@tim-hm
Copy link
Author

tim-hm commented Dec 13, 2023

Could we have two solutions for two different scenarios?

@anasereijo maybe we pause until we've had time to think through the design for handling offline?

@anasereijo
Copy link
Collaborator

@anasereijo maybe we pause until we've had time to think through the design for handling offline?

Agree, the whole offline experience needs more thinking, but I think that in the meantime it is important to tell the users what's going on somehow

@spydon
Copy link
Collaborator

spydon commented Aug 20, 2024

Fixed by #1723

@spydon spydon closed this as completed Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants