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

Board doesn't update after move #11

Closed
flugsio opened this issue Jan 12, 2015 · 11 comments
Closed

Board doesn't update after move #11

flugsio opened this issue Jan 12, 2015 · 11 comments

Comments

@flugsio
Copy link
Contributor

flugsio commented Jan 12, 2015

Playing anonymously with computer. After I make a move my time is still ticking and the piece doesn't move. The pieces valid destinations gets dots on them and the target square gets highlighted as if I moved there. If i start another game via the star and then press "back", then the board is updated and I can see the opponents move.

Samsung I9100 Galaxy S II
Android 4.1.2
lichess 1.0.0 (beta2)

After move: http://i.imgur.com/svUt6JN.png

@veloce
Copy link
Collaborator

veloce commented Jan 12, 2015

Ok, interesting. This is hard to reproduce for me since I don't have your device.
Can you post here any JavaScript error if you find some ? Thanks.
I'll also to try to find a device with Android < 4.4

If you don't how to use dev tools with android, here is a link:
https://developer.chrome.com/devtools/docs/remote-debugging

@ornicar
Copy link
Collaborator

ornicar commented Jan 12, 2015

I'll have a similar device and OS tomorrow.

Also isn't strange that, on the screenshot, ANONYMOUS is playing black but the white background is on the bottom?

@veloce
Copy link
Collaborator

veloce commented Jan 12, 2015

Ahhhhhhhhhhh it was supposed to be like that ? I had no idea ;)

@flugsio
Copy link
Contributor Author

flugsio commented Jan 13, 2015

My device show up in chrome://inspect but no pages show, isn't this needed in the code first? https://developer.chrome.com/devtools/docs/remote-debugging#debugging-webviews

Was trying to compile with that but #10

(failed to install chrome on device)

@peutetre
Copy link
Contributor

@veloce, you should use something like https://github.com/peutetre/cordova-plugin-acra to catch js errors for the beta!

@veloce
Copy link
Collaborator

veloce commented Jan 13, 2015

I'll update the readme as soon as I have some time.

@flugsio there is nothing in the code. But you need to enable developer mode in your phone.

@flugsio
Copy link
Contributor Author

flugsio commented Jan 13, 2015

Found this in adb logcat
D/CordovaActivity(25051): CordovaActivity.init() I/dalvikvm(25051): Could not find method android.webkit.WebView.setWebContentsDebuggingEnabled, referenced from method org.apache.cordova.CordovaWebView.enableR emoteDebugging W/dalvikvm(25051): VFY: unable to resolve static method 406: Landroid/webkit/WebView;.setWebContentsDebuggingEnabled (Z)V

@flugsio
Copy link
Contributor Author

flugsio commented Jan 13, 2015

This is everything in the log for 2 taps, first to select piece then target square. I see 2 errors there.

I/InputReader( 2115): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.6092 ] I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x0 I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x0 I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x0 W/PowerManagerService( 2115): Timer 0x3->0x3|0x3 I/InputReader( 2115): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x1 I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x1 I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x1 V/WebViewInputDispatcher(25051): blockWebkitDraw V/WebViewInputDispatcher(25051): blockWebkitDraw lockedfalse D/CordovaLog(25051): file:///android_asset/www/app.js: Line 1 : Uncaught ReferenceError: requestAnimationFrame is not defined E/Web Console(25051): Uncaught ReferenceError: requestAnimationFrame is not defined:1 I/ClipboardServiceEx( 2115): Send intent for dismiss clipboard dialog inside hideCurrentInputLocked() ! I/InputReader( 2115): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.6093 ] I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x0 I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x0 I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x0 W/PowerManagerService( 2115): Timer 0x3->0x3|0x3 D/CordovaLog(25051): file:///android_asset/www/app.js: Line 1 : Uncaught ReferenceError: requestAnimationFrame is not defined E/Web Console(25051): Uncaught ReferenceError: requestAnimationFrame is not defined:1 I/InputReader( 2115): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x1 I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x1 V/WebViewInputDispatcher(25051): blockWebkitDraw I/InputDispatcher( 2115): Delivering touch to current input target: action: 0x1 V/WebViewInputDispatcher(25051): blockWebkitDraw lockedfalse I/ClipboardServiceEx( 2115): Send intent for dismiss clipboard dialog inside hideCurrentInputLocked() !

@veloce
Copy link
Collaborator

veloce commented Jan 13, 2015

Ok bug found: thanks!
Android 4.1 webview doesn't support requestAnimationFrame, we'll provide a workaround.

@veloce
Copy link
Collaborator

veloce commented Jan 13, 2015

Fixed with beta version 1.0.2 normally. Can you confirm @flugsio ?

Also since this is an old Android, animations may perform poorly. You can disable them when #37 is fixed ;)

@flugsio
Copy link
Contributor Author

flugsio commented Jan 13, 2015

Yes! :) works in lichess beta 1.0.2

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

4 participants