chilipie-kiosk icon indicating copy to clipboard operation
chilipie-kiosk copied to clipboard

Random google.com

Open kpdillon opened this issue 3 years ago • 12 comments

Randomly my chili kiosks will change url and default to Google.com. What could be causing this? How do I prevent this from happening?

kpdillon avatar Oct 28 '20 13:10 kpdillon

Second that, I have noticed this issue as well. About 1/5 startups will lead to google.com.

markovchainz avatar Oct 30 '20 21:10 markovchainz

@kpdillon If you set a default webpage to open (in .xsession) and clear the cache before chromium starts, the issue does not appear. This doesn't help if you need the last opened page to show up after a reboot though...

markovchainz avatar Nov 04 '20 16:11 markovchainz

@markovchainz Thank you for this info. What parameter do I set for this in the xsession file? And how do I clear the cache each time before chromium starts?

kpdillon avatar Nov 07 '20 21:11 kpdillon

@kpdillon This is what I did:

sudo rm -r ~/.cache/chromium
sudo rm -r ~/.config/chromium/Default
chromium-browser --start-fullscreen --window-size=1920,1080 --disable-infobars http://example.com &

Remember that this will always open http://example.com regardless of the user's previous session.

After further experimentation this weekend, I haven't found it necessary to include the first 2 lines (the cache removal) to avoid the google.com problem. But if you want to start with a fresh chromium on every boot, it doesn't hurt to include. Just be aware that the second line sudo rm -r ~/.config/chromium/Default will remove any loaded extensions (i.e. virtual keyboards), local storage data and settings saved.

markovchainz avatar Nov 07 '20 21:11 markovchainz

That sounds strange.

@kpdillon @markovchainz do you have any extensions that might be causing this? Is it regular google.com, or some Google login page, or..?

jareware avatar Feb 24 '21 18:02 jareware

I can't get this to work. For me it keeps on booting to the first page that I went to (let's say http://example.com) instead of the one that I have left it at when rebooting (let's say http://example.com?key=1234). I've tried setting the default page in Chrome settings. I've tried setting it in xsession as above and it just always returns to the same page. Does anyone have any ideas?

mrchimp avatar Feb 26 '21 15:02 mrchimp

Even when you set it in Chrome and/or .xsession? 😳 Which version are you running?

jareware avatar Feb 27 '21 08:02 jareware

Which version of Chilipie? The latest. Brand new installation.

mrchimp avatar Mar 01 '21 17:03 mrchimp

I've done some more testing. Apologies if this is a separate issue but it seems relevant to this.

Setting Chrome to open a specific page didn't fix the problem. Using the code above didn't solve the problem. When I then set it to "continue where I left off" and removed the URL from the chromium-browser line in .xsession, after a reboot I was left with the two tabs I had left open (one with the correct URL and another on example.com just as a test) as well as a third tab with the wrong URL (the one that had been showing previously).

Now when I reboot it seems to work correctly but I feel like I'm at the whim of Chrome remembering where I was and therefore might be at risk of the original issue - i.e. it going to google.com.

One thing that seems odd is that I still have the rm -rf lines as detailed above in my .xsession which, if I understand correctly, should clear my Chrome settings and so it shouldn't be able to continue where it left off - but it does!

Also, I was doing all of this on a test Pi in order to debug one that is in production that has the same issue - that is, the URL reverting, not it going to google.com. And while they were both made from Chilipie v2.1.0, for some reason the one in production doesn't have the "On startup" section in the settings at all!

If anyone can provide any clarity on any of this I would appreciate it. Again, sorry if this is off-topic for this issue but I feel like the problems probably have the same root cause.

mrchimp avatar Mar 08 '21 14:03 mrchimp

Doesn't sound like off-topic to me, though I'm afraid I haven't seen this behaviour myself. 😳

Please report back if you can sort this out, sounds important to know what's going on.

jareware avatar Mar 10 '21 09:03 jareware

Well this is kind of embarrassing but I'll leave here because I don't want to be that guy.

I had a really obvious typo in the rm -r lines that meant it wasn't doing anything.

I also needed to quote the URL as everything after the first & was being ignored, which resulted in it going to what was coincidentally the first URL that I entered.

I haven't tested it on the production device yet but I think this probably answers my questions, except for one. I still don't understand why my production Pi doesn't have the "on startup" section in the Chromium settings.

mrchimp avatar Mar 19 '21 12:03 mrchimp

WHAT DID YOU SEE

😄

Thanks for letting us know, really appreciate it!

With regard to the Chromium settings, that indeed seems weird. There's a new RC out that has updated Chromium (among other things), guess you could try that. 🤷

jareware avatar Mar 24 '21 09:03 jareware