Min: Error pages cannot reload the actual page

Created on 7 Jun 2017  路  12Comments  路  Source: minbrowser/min

If the network connection has been down and I have got "An error occured", then I'm unable to load the page again - neither Ctrl+R nor the "try again" button work - i.e. nothing seems to happen. The URL is somewhat obfuscated (the ?=&/ signs are urlencoded) and I cannot easily copy-paste the url in another tab, which is completely annoying.

In non-private tab with an errored youtube video after reload the youtube page flashed for a moment and the error screen reappeared. It's weir because in the titlebar the video title was kept, despite the error page.

bug

All 12 comments

Was the URL formatted correctly? (you can do decodeURIComponent(url) in the console to find out what the decoded url is). It makes sense that mod+r wouldn't work, because it would just reload the error page itself, but I can't think of any reason why clicking the button wouldn't work.

I get this JS error when the error page loads:

Uncaught TypeError: Cannot read property 'secondaryAction' of undefined
at error.js:90
(anonymous) @ error.js:90

(database opened is logged thereafter)

Pressing the "Try Again" button does not trigger any further messages.
The url is file:///home/user/minbrowser/pages/error/index.html?ec=-137&url=https%3A%2F%2Fwww.startpage.com%2Fdo%2Fasearch, and decodeURIComponent shows that the url parameter is well encoded.

This happens if the network has been down. After resume from suspend, for example, before the internet connection has been established, if I try to load some page, I get the error page.

I do also think that error pages should not rewrite the url in such an ugly way. If I make a typo in the url, I get this: file:///home/user/minbrowser/pages/error/index.html?ec=-105&url=http%3A%2F%2Fnonexistingdomain.com%2F, and it is really annoying that I have to write it again, instead of just fix the typo I made.

I think the error is fixed as part of #369.

I had a node application opened in min, running on address localhost:3000.
I killed the node server and closed min, and the next time I opened min I got "An error occurred" (as expected). I started the server again, but the "Try again" button on the page in min didn't seem to do anything.

I don't even think the page tried to reload because in the web console no actions were registered. I got the same error I mentioned earlier, this time on line 97:

Uncaught TypeError: Cannot read property 'secondaryAction' of undefined
at error.js:97

Here are the relevant lines:

https://github.com/minbrowser/min/blob/212fb573da11862ffd4ae941b8b0fd71eef0471f/pages/error/error.js#L85-L98

I'll add another check on line 97 for err and if it works, I'll send a PR.

I just checked the PR you linked at the lines I posted above; as it turns out ProPurke already addressed this issue. I made the same edit locally and it worked.

The author of that PR seems to have stopped working on it, so I'll add the fix for this separately.

I've added the fix for this separately in ebfb5e3370782278916b66ce9f54501cf240ca53.

The 1.7.0 version that includes this fix has been released, you can download it from here: https://github.com/minbrowser/min/releases/tag/v1.7.0.

@PalmerAL When a page has an error, the cmd + r shortkey also doesn't work: http://domain.com:5000 becomes file:///Applications/Min.app/Contents/Resources/app/pages/error/index.html?ec=-102&url=http%3A%2F%2Fdomain.com%2F

It would also be nice if the error page disappeared when it does get a connection again and is fetching the page, or at least the loading bar. Currently it starts pulling a new page and doesn't replace the error page until it is fully loaded.

(this is on 1.7.0 on newest macOS high sierra)

@Superpencil Thanks for pointing this out! I've split this into separate issues: #499 and #500.

@Superpencil second issue is fixed in 776f903760425055f5a8b3c9a4e28c1ad1148004 and 93b3f816fb732f0094eb019c834b82ffedebbc00.

@Superpencil first issue is fixed in 5cdc97753decdad933b1e84ffc4bdddc6b8cc7d1; will be included in 1.8.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kohlrak picture kohlrak  路  6Comments

whitelynx picture whitelynx  路  5Comments

jersonlatorre picture jersonlatorre  路  3Comments

dj-sash picture dj-sash  路  7Comments

PEPERSO picture PEPERSO  路  7Comments