ownnote icon indicating copy to clipboard operation
ownnote copied to clipboard

Android: NPObject error when creating new notes

Open g4ve opened this issue 10 years ago • 12 comments

Hi, after correctly connecting with my owncloud server, I can read my messages, created via the web interface, but each time I try to create a new note or save a modified note the app gives me an error saying

"an application error has occured. please report it here. full details can be found in your logcat: ReferenceError: NPObject deleted"

After that the login screen is shown and, if I try to log in, I'm bounced with the same error message. Could you please help me to use your app?

g4ve avatar Jun 22 '15 10:06 g4ve

Now that's an odd one. Can you login as [DEBUG]username replacing with your username, and paste the logcat here?

Fmstrat avatar Jul 07 '15 20:07 Fmstrat

This is the output of logcat (grepped with "NPO") when i login to the app, open an existing note and try to save it after a modification :

/D/CordovaLog( 9119): file:///android_asset/www/cordova.js: Line 962 : Uncaught ReferenceError: NPObject deleted// //I/chromium( 9119): [INFO:CONSOLE(962)] "Uncaught ReferenceError: NPObject deleted", source: file:///android_asset/www/cordova.js (962)// //D/CordovaLog( 9119): file:///android_asset/www/js/index.js: Line 1090 : OWNNOTEERROR: ReferenceError: NPObject deleted// //I/chromium( 9119): [INFO:CONSOLE(1090)] "OWNNOTEERROR: ReferenceError: NPObject deleted", source: file:///android_asset/www/js/index.js (1090)// / At the same time i'm kicked out from the server with the message "an application error has occured. please report it here. full details can be found in your logcat: ReferenceError: NPObject deleted". If i try to login again (without killing the app before) i get the following logcat:

/D/CordovaLog( 9119): file:///android_asset/www/js/index.js: Line 1090 : OWNNOTEERROR: ReferenceError: NPObject deleted// //I/chromium( 9119): [INFO:CONSOLE(1090)] "OWNNOTEERROR: ReferenceError: NPObject deleted", source: file:///android_asset/www/js/index.js (1090)// //D/CordovaLog( 9119): file:///android_asset/www/js/index.js: Line 1090 : OWNNOTEERROR: ReferenceError: NPObject deleted// //I/chromium( 9119): [INFO:CONSOLE(1090)] "OWNNOTEERROR: ReferenceError: NPObject deleted", source: file:///android_asset/www/js/index.js (1090)// / thank you and cheers

Il 07/07/2015 22:21, Fmstrat ha scritto:

Now that's an odd one. Can you login as |[DEBUG]username| replacing with your username, and paste the logcat here?

— Reply to this email directly or view it on GitHub https://github.com/Fmstrat/ownnote/issues/168#issuecomment-119324630.

g4ve avatar Jul 09 '15 11:07 g4ve

Could you post the same log but grep for Cordo instead so I can see what functions are being called?

Fmstrat avatar Jul 09 '15 13:07 Fmstrat

here it is:

I/CordovaLog(13781): Changing log level to DEBUG(3) D/CordovaActivity(13781): CordovaActivity.init() I/dalvikvm(13781): Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method org.apache.cordova.CordovaWebView.initWebViewSettings D/CordovaActivity(13781): CordovaActivity.createViews() I/dalvikvm(13781): Could not find method android.webkit.WebViewClient.onReceivedClientCertRequest, referenced from method org.apache.cordova.CordovaWebViewClient.onReceivedClientCertRequest I/dalvikvm(13781): Could not find method android.webkit.WebChromeClient$FileChooserParams.createIntent, referenced from method org.apache.cordova.CordovaChromeClient.onShowFileChooser D/CordovaWebView(13781): CordovaWebView is running on device made by: nubia D/CordovaWebView(13781): >>> loadUrl(file:///android_asset/www/index.html) D/CordovaWebView(13781): >>> loadUrlNow() D/CordovaActivity(13781): Resuming the App D/CordovaWebViewClient(13781): onPageStarted(file:///android_asset/www/index.html) D/CordovaActivity(13781): onMessage(onPageStarted,file:///android_asset/www/index.html) D/CordovaWebViewClient(13781): onPageFinished(file:///android_asset/www/index.html) D/CordovaActivity(13781): onMessage(onPageFinished,file:///android_asset/www/index.html) W/CordovaPlugin(13781): Attempted to send a second callback for ID: StatusBar1739350423 W/CordovaPlugin(13781): Result was: "Invalid action" D/CordovaActivity(13781): onMessage(spinner,stop) D/CordovaNetworkManager(13781): Connection Type: wifi D/CordovaNetworkManager(13781): Connection Extra Info: "eduroam" D/CordovaNetworkManager(13781): Connection Type: wifi D/CordovaNetworkManager(13781): Connection Extra Info: "eduroam" D/CordovaActivity(13781): onMessage(networkconnection,wifi) D/CordovaLog(13781): file:///android_asset/www/plugins/com.triarc.sqlitePlugin/www/SQLitePlugin.js: Line 39 : SQLitePlugin openargs: {"name":"ownnote.db"} D/CordovaLog(13781): file:///android_asset/www/plugins/com.triarc.sqlitePlugin/www/SQLitePlugin.js: Line 49 : DB opened: ownnote.db D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : buildListing D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : listNotes D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : startSync D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : app is online D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Set Basic Auth D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : checkVersion D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Server version:1.0 D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : syncAllNotes D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : localnotes length: 3 D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : syncnotesin:0 D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : syncnotesout:0 D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : checkForDuplicates D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : syncCheckNote D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : About to finish, checking for missing D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : syncFinished D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Localnotes: 3 D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : buildListing D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : listNotes D/CordovaActivity(13781): onMessage(spinner,stop) D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Finished reading file: spesa D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : tinymceinited: false D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : updateViewer D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : resizeImages D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : makeLinks D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : tinymceInitFinished D/CordovaLog(13781): file:///android_asset/www/cordova.js: Line 962 : Uncaught ReferenceError: NPObject deleted D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Back pressed D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Back pressed from: Edit Note D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 1090 : OWNNOTEERROR: ReferenceError: NPObject deleted D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : buildLogin D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Error: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh' D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Error: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh' D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : buildListing D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : listNotes D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : startSync D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : app is online D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 1090 : OWNNOTEERROR: Error: cannot call methods on popup prior to initialization; attempted to call method 'open' D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : buildLogin D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Error: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh' D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Error: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh' D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 1090 : OWNNOTEERROR: ReferenceError: NPObject deleted D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : buildLogin D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Error: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh' D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : Error: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh' D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : updateViewer D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : resizeImages D/CordovaLog(13781): file:///android_asset/www/js/index.js: Line 302 : makeLinks

Il 09/07/2015 15:30, Fmstrat ha scritto:

Could you post the same log but grep for |Cordo| instead so I can see what functions are being called?

— Reply to this email directly or view it on GitHub https://github.com/Fmstrat/ownnote/issues/168#issuecomment-119965973.

g4ve avatar Jul 09 '15 14:07 g4ve

OK, I don't see anything specific that would cause this so I'm going to have to try to reproduce it. To do that, I've got a few questions:

  • What version of Android are you running?
  • Is it stock, Samsung, Sense, or something else?
  • Are you running a custom ROM?
  • What version of ownNote are you running in Android?
  • What version of ownNote are you running on the server?
  • What version of ownCloud do you have installed on the server?
  • Does it happen on all notes? If not, is there anything unique about the content or title of the notes it breaks on?

Fmstrat avatar Jul 09 '15 21:07 Fmstrat

hi, below my answers, point by point

  • What version of Android are you running?

4.4.2

  • Is it stock, Samsung, Sense, or something else?

zte nubia z7 mini version (kernel version: 3.4.0-perf-g6a377e3, build number: NX507J_CNCommon_V1.42)

  • Are you running a custom ROM?

no

  • What version of ownNote are you running in Android?

version 1.0

  • What version of ownNote are you running on the server?

version 1.0

  • What version of ownCloud do you have installed on the server?

8.0.4

  • Does it happen on all notes? If not, is there anything unique about the content or title of the notes it breaks on?

it happens on all notes, when i try to modify them. no problem instead if i create one or if i modify it on the server (via web interface), the note is correctly updated on my phone.

— Reply to this email directly or view it on GitHub https://github.com/Fmstrat/ownnote/issues/168#issuecomment-120144756.

g4ve avatar Jul 10 '15 07:07 g4ve

I upgraded my owncloud server to 8.1 and the ownnote server app to 1.05. the ownnote smartphone app is still 1.0 version and the issue is still present.

g4ve avatar Jul 13 '15 14:07 g4ve

Yes, this bug is still marked Open. Your managing to create an issue in the cordova deployment code, and I haven't been able to figure out what is triggering it yet.

Fmstrat avatar Jul 14 '15 12:07 Fmstrat

I'm just updating this ticket to say that while it's an old one, I'm still keeping it in mind at each release stage. I've yet to be able to reproduce it, and haven't had the report from another user.

Fmstrat avatar Oct 21 '15 22:10 Fmstrat

I have encountered this problem, found is due the webpage used the iframe, are you also this problem?

xing634325131 avatar Nov 09 '15 07:11 xing634325131

Hi, I don't know what webpage are you speaking about. Could you be more clear? By the way, i still have the same problem, after upgrading owncloud server to 8.2.0. Bye

g4ve avatar Nov 09 '15 09:11 g4ve

I didn't use ownnote,it's my app encountered this problem:Uncaught ReferenceError: NPObject deleted. My colleague found the reason is that the webview content page(which is the server provide,so i called it webpage) used iframe ,then he made some changes and my app runs nomally.I guess your problem is similar to this. There may be a relationship with the device,my device is zte v5,while others not have this problem.

xing634325131 avatar Nov 09 '15 11:11 xing634325131