wallpanel-android icon indicating copy to clipboard operation
wallpanel-android copied to clipboard

[BUG] browser gets in bad state and wont respond to http commands correctly

Open mogorman opened this issue 3 years ago • 6 comments

Describe the bug I have a gallery web app that I connect to with this. Occasionally it looks like a xref request fails to grab an image. When this happens the browser seems to lock up. the http api commands like brightness or settings seem to work, but relaunch , reload , and url seem to do nothing. the currentUrl never seems to update. When I first got into this state i was able to do an eval alert one time without a problem. now any time i issue it also does nothing.

To Reproduce Long running websocket with xref requests. I realize this is very connected to what I am doing so if you have suggestions on how to debug I am happy to look into it.

Smartphone (please complete the following information):

  • Device: [Fire Tablet HD8]
  • OS: [e.g. Fire OS 7.3.2.6]
  • Applicaiton version [v0.10.4 Build 0]

mogorman avatar Nov 15 '22 15:11 mogorman

maybe it would be possible to have last console.log be accessible as a api/state var?

mogorman avatar Nov 15 '22 15:11 mogorman

also it looks like even on a non crashed app. the alert function only works one time.

curl http://10.0.42.60:2971/api/command --header 'Content-Type: application/json;charset=UTF-8' --data-raw '{"eval": "alert(2);"}'
# clear the 2 by pressing okay
curl http://10.0.42.60:2971/api/command --header 'Content-Type: application/json;charset=UTF-8' --data-raw '{"eval": "alert(2);"}'

mogorman avatar Nov 15 '22 15:11 mogorman

url and eval also only seems to work one time and block all future commands after being called.

mogorman avatar Nov 15 '22 15:11 mogorman

relaunch and reload seems to be fine on recalls.

mogorman avatar Nov 15 '22 15:11 mogorman

I experienced the same issue, I had to restart the WallPanel app after sending an command with "eval".

Device: NSPanel Pro

JavanXD avatar Mar 07 '24 12:03 JavanXD

@TheTimeWalker could you please take a look at this BUG?

You call stopDisconnectTimer() once a eval() command is triggered which is unnecessary. The same for url() command. https://github.com/TheTimeWalker/wallpanel-android/blob/4c276ba7a2aa10240cdcf029e66c4b4695e9b20c/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/activities/BaseBrowserActivity.kt#L89

JavanXD avatar Mar 07 '24 12:03 JavanXD