i got a webapp build via flambe/haxe which is wrapped by phonegap build to get an .ipa and .apk. For now the only remaining error is that the app looses its context if i switch between apps or pressing home-button resulting in the following error on android:
"W/Adreno200-EGL(31381): <qeglDrvAPI_eglSetBlobCacheFuncsQCOM:5575>: EGL_BAD_PARAMETER"
"E/libEGL(31381): eglSetBlobCacheFuncsANDROID resulted in an error: 0x300c"
"E/SurfaceTexture(31381): [unnamed-31381-1] updateTexImage: invalid current EGLContext"
"E/CanvasTexture(31381): unexpected error: updateTexImage return -38"
The last two lines keep repeating (even after several minutes) until i close the app manually which results in the following error-message:
"E/libEGL(21636): call to OpenGL ES API with no current context (logged once per thread)"
Full errorlog can be viewed here: http://goo.gl/UkxwfI (Dropbox)
One thing that keeps bugging me is the following message since all "related" problems got that feature turned ON, but i cant find anything to change that.
"D/webcoreglue(31381): netstack: Memory Cache feature is OFF"
Another thing is with: D/CordovaActivity(31381): CB-3064: The errorUrl is null
As of http://goo.gl/qZWc4F (github) there seems to be a problem on resuming in cordova. (just strg+f "cb-3064")
Took me the whole day to use google on terms like:
EGL_BAD_PARAMETER, qeglDrvAPI_eglSetBlobCacheFuncsQCOM, SurfaceTexture, CanvasTexture, updateTexImage, invalid current EGLContext, eglSetBlobCacheFuncsANDROID, error: 0x300c, OpenGL ES API
but without any good hints or helpful info.
additional information:
tested on Sony Xperia J (ST26i) and android 4.1.2
min android SDK 14
android:hardwareAccelerated="true" (default since sdk 14)
landscape + fullscreen
webview used to display the website coming from flambe/haxe
used build phonegap / phonegap 3.3 (using 2.8 - 3.3 = same)
building it myself via cordova doesnt help (so it should not relate to phonegap build)
cordova.inappbrowser only used to open links in external browser, website running in webview
website only shows a html5-game (nothing fancy, just something like bejeweld)
Maybe there's some easy help by juggling with the Android-Manifest. I really dont want to do native since the webapp is shipped to iOS via Phonegap too.
Update 1
Tried to reproduce the error using native android and playing with different manifest-settings. But it seems like this has something to do with how phonegap/cordova handles the drawing of everything on screen.
Next things to do will involve posting on phonegap-forums and checking out iOS errorlog. Maybe i find something while comparing my results to: iOS app crashes on resuming
Update 2
iOS-Errorlog doesn't help. Exception Type 20 and Exception Code 8badf00d. Stack shows errors with graphics too (like in android). Errorlog see Link in Comment...
"Fixed" by building android and ios myself with cordova. Resuming/Restarting feels a bit bumpy but thats the next thing to fix.
Phonegap build just doesn't like the life cycle of apps.
Related
I am developing mobile app(in Ionic4), but I am not able to inspect it and debug it in chrome devtools. When I go to Chrome/inspect the device with running app appears in the list, but when I click on inspect, only blank page opens, it looks like this:
device page
blank inspect page
When i hit Ctrl+Shift+I blank page reopens, and i can look into the console, there are some errors:
Uncaught TypeError: Cannot read property 'appendChild' of null
at installExtraStyleRules (devtools_compatibility.js:1484)
at installBackwardsCompatibility (devtools_compatibility.js:1457)
at devtools_compatibility.js:1504
at devtools_compatibility.js:1506
Uncaught TypeError: Cannot redefine property: keyIdentifier
at Function.defineProperty (<anonymous>)
at installBackwardsCompatibility (devtools_compatibility.js:1381)
at devtools_compatibility.js:1504
at devtools_compatibility.js:1506
[Deprecation] Application Cache was previously restricted to secure origins only from M70 on but now secure origin use is deprecated and will be removed in M82. Please shift your use case over to Service Workers.
Uncaught TypeError: Object.observe is not a function
at WebInspector.Main._createSettings (inspector.js:10380)
at WebInspector.Main._gotPreferences (inspector.js:10372)
at DevToolsAPIImpl.embedderMessageAck (devtools_compatibility.js:43)
at <anonymous>:1:13
Any ideas where is the problem? It happens only on this type of device, on other devices, it works great.
I have a little experience with Ionic. Not a big fan, since this is the start of the bugs you will face. You have to be a professional expert Javascript programmer to understand every bit of the code Ionic uses to compile (to debug and find problems). And even then I find it hard to find some errors too.
My advice is to switch to React Native with the Typescript template. Since Typescript gives you the best linting, help with errors and compiling. I have built multiple apps using Ionic, all far less advanced and beautiful then my React Native work. As well as other programmers to understand you're code, it's better to use Typescript with generics, interfaces, classes and such... If you have any other questions, post them below and I edit this post.
I am in the process of testing a hybrid app for Android 4.4+. The app consists of
one custom plugin (my own effort)
the HTML UI created using Phonon.
Phonegap CLI v 6.4.2
My test device is a Huwaei Holly running Android 4.4.2
One of the issues I have run into is the fact that the caret in textarea and input controls stops working "after a while" and the soft keyboard does not popup when I tap the control.
By dint of some trial and error I pinned down the problem - it happens AFTER the app has displayed at least one vanilla HTML/JS alert box which I am using for my own debugging needs. Replacing that with a Phonon.alert box - which is simply an overlayed layer of HTML, not a new window as, I imagine, the bog standard alert is - "fixed" the problem.
Very good but the fact that this happens at all still bothers me - I will not use vanilla alerts in my release build but if it happened with alerts it might well happen with something else.
A spot of Googling revealed that is a known issue that appears to have been around for a while. This SO thread, for instance, suggests the Webview has to be set as being focussable and I have run into the same suggestion elsewhere too.
However, it is not at all clear to me just where I should do this. About the only configuration locations I have at my disposal are
The config.xml file for my Phonegap/Cordova project
The plugin.xml file for my custom Phonegap/Cordova plugin
The Phonegap docs related to config.xml do not mention anything about FrameworkLayout, android:focussable etc.
I'd be most grateful to anyone who might be able to either
explain just where the android:focussable bit should go or
suggest the root cause of the problem.
We are using Cordova 5.0.0 and its cordova-camera-plugin
When we are testing it on Android, the app crashes when the user takes a photo.
Looking at the links below, it seems that our app is being killed while the camera app it on front.
PhoneGap camera restarts the application
https://github.com/shaithana/cordova-plugin-wezka-nativecamera
While there are some answers but it seems to be outdated: The foreground camera plugin is not suitable to newer devices or Cordova and other solutions didn't work for us
Does anyone have an up-to-date solution?
Try to use this forked cordova-android and cordova-plugin-camera.
The docs, sample and discussion on the approach used can be found in the cordova-android PR.
BTW, the PRs are going to be merged soon.
First question that comes to my mind is: Why using this camera plugin: https://github.com/shaithana/cordova-plugin-wezka-nativecamera
It's obviously a fork. You might have a good reason for that. It's also outdated. Last contribution was one year ago.
Maybe you want to give the "official" plugin a shot:
https://github.com/apache/cordova-plugin-camera
Going deeper into detail without knowing more about your testing environment (which device(s) with which Android version) and without having possibility to review entire related code, is not possible and answers may not give any reliable advice for change.
Have you ensured, that the call to the camera plugin cannot happen before "deviceready" was triggered? Is cordova.js loaded?
Update:
You may also want to switch from raw alerts to console output. I recognized several times that alerts in callbacks triggered from plugins could cause some trouble.
As a general rule of thumb: Use console.log() instead of alert() and connect with Chrome (chrome://inspect) to the emulator or device to see what happens. You can additionally use adb logcat to have a look into the device log.
I have reached a problem in the final stages of completing my stack. I have been working on this project for a couple months now and it is finally complete. The aim of the app is for you (as the user) to be able to have a type of calculator which performs a certain sequence of sums once a numerical value is entered. It is now finished (thank goodness! :P) but I have reached an error whilst saving this app. I am saving it as an Android application (.apk) for use on a mobile phone. I have the Android personal 1 pack, and my error is as follows:
There was an error while saving the standalone application could not compile application class
I am unsure as to why this is occurring but find it hard to believe that this could have occurred because of either invalid syntax or that a command I was using was incompatible with Android.
As I said before my stack is very simple and only performs a few basic mathematical functions (mainly multiplying contents of fields) by each other. If you wish to see this script, please request.
#ninjabunny14 yep it's a good idea to include code, actual text of error messages, details of the platform you're developing on, versions of LiveCode/Android etc
In the meantime you could Google "error while saving the standalone application could not compile application class" like I've just done and found quite a few links to LiveCode forum threads (like this one http://forums.runrev.com/phpBB2/viewtopic.php?f=53&t=12330) which look like they might be of use...
NinjaBunny,
This sounds more like an error from the Android SDK than a LiveCode error. For starters check these things in the Android settings pane in the LiveCode Standalone Applications Settings:
Identifier: It has to be unique to this application. If you've ever done a test build for Android without changing this default identifier you will get an error.
Signing: Unless you have a key, choose Sign for development only or Don't sign.
Minimum Android version: make sure you have all of the packages needed for your target version in your Android SDK.
Go to Edit/Preferences and set up the Android SDK path, which is probably empty in your case:
I had this a few times because it is easy to forget.
The identifier in the android settings does not like characters like - so do not use a name like com.itis-me.myapp , but use com.itisme.myapp
the use of a character like - gives you this error.
I just recently started doing some Android app development, based on Phonegap (due to my web based background (PHP/MySQL)) and jQuery mobile. First tests are promising, but the next level is a bit too much for me.
I'm trying to integrate this plugin: https://github.com/saileshmittal/phonegap-system-notification-plugin
I have followed the readme file and my app seemed to be working fine (no notifications just yet but also no errors) but when I opened my project this morning, Eclipse showed the following errors:
Invalid ZIP archive: src/com/phonegap/myapp/SystemNotification.java [in myapp]
Invalid preference page path: XML Syntax
Next to this error, I don't quite understand how to show the system notification. I have tried the following:
navigator.SystemNotification.createStatusBarNotification('contentTitle', 'contentText', 'tickerText');
and:
navigator.systemNotification = new SystemNotification();
navigator.SystemNotification.createStatusBarNotification('contentTitle', 'contentText', 'tickerText');
Again, my background is web based. I'm familiar with PHP, MySQL, Javascript, jQuery, etc. but Java is completely new to me. The objective to my app at this point is to show some checkboxes (loaded from an external server) and save which ever checkbox is checked. This seems to be working fine. I'm testing showing the checked ones as a system notification. Seeing I have an Android powered phone, I'm working off that right now, planning to port it to iPhone and other devices later on.
If somebody could point me in the direction of push notification for later purposes, I'd appreciate it.