cocos / engine-native

Native engine for Cocos Creator v2.x

Home Page:http://www.cocos.com/en/products

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ErrorLog Failed to invoke JSB_showInputBox

truongpd88 opened this issue · comments

Hello, i saw this thread (https://forum.cocos.org/t/2-1-2editbox-bug/81312), it's not my case, but same log, same behaviour, cannot touch edit box.

  • create a new scene with a web view, an editBox, a button(open webview)
  • run the game on android
  • first you can click on edit box normally
  • open webview( by click on button )
  • close webview by js interface scheme and in callback set a string to edit box
  • now cannot touch edit box to modify
    and i found in android console log
    E/jswrapper: jsb: ERROR: File C:/CocosDashboard_1.0.17/resources/.editor/3.3.0/resources/resources/3d/engine-native/cocos/bindings/manual/jsb_global.cpp: Line: 781, Function: JSB_showInputBox
    2021-09-16 22:58:11.769 11766-11788/? E/jswrapper: defaultValue is invalid!
    2021-09-16 22:58:11.769 11766-11788/? E/jswrapper: [ERROR] Failed to invoke JSB_showInputBox, location: C:/CocosDashboard_1.0.17/resources/.editor/3.3.0/resources/resources/3d/engine-native/cocos/bindings/manual/jsb_global.cpp:849

You are appreciated if you can provide a demo.

sry, i cannot read chinese, https://forum.cocos.org/t/app-editbox-function-jsb-showinputbox-2-1-0/81028, but i found another thread, mention this issue, i have not tried it. but i can fix my issue like it
before self.editPass.string = params['mnemonic'];
after self.editPass.string = ""+params['mnemonic'];
thanks for your reply @minggo

Got it, thanks.