I am using IBM MobileFirst 7.0 for creating a hybrid app. We recently deployed the .wlapp file for android without changing the previous app version. On successful deployment, when I run the app, I get the the following alert message -
"Newer web resources are available. Would you like to download them now?(file size is 86KB)"
On clicking the update button, the unpacking progress bar appears and fills up. But at the end of it I get the message- "Update failed. Direct update failure."
I have tried updating the app on mobile internet and WiFi but the issue still persists.Previously the direct update feature was working fine.
Logcat logs:
06-17 18:44:14.099: D/dalvikvm(17948): GC_FOR_ALLOC freed 485K, 62% free 4275K/11180K, paused 14ms, total 18ms
06-17 18:44:14.109: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.downloadZipFile in WLDirectUpdateDownloader.java:143 :: 7772 bytes are already available.
06-17 18:44:14.149: D/dalvikvm(17948): GC_FOR_ALLOC freed 553K, 63% free 4218K/11180K, paused 10ms, total 10ms
06-17 18:44:14.149: W/HardwareRenderer(17948): Attempting to initialize hardware acceleration outside of the main thread, aborting
06-17 18:44:14.159: W/PluginManager(17948): THREAD WARNING: exec() call to WLDirectUpdatePlugin.showProgressDialog blocked the main thread for 95ms. Plugin should use CordovaInterface.getThreadPool().
06-17 18:44:14.219: I/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.validateZipFileIntegrity in WLDirectUpdateDownloader.java:113 :: Direct update authenticity public key not provided, direct update authenticity check disabled
06-17 18:44:14.229: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.extractZipFile in WLDirectUpdateDownloader.java:265 :: Start copy files to local storage from updated zip file...
06-17 18:44:14.229: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.extractZipFile in WLDirectUpdateDownloader.java:266 :: Size of zip file is 7772
06-17 18:44:14.459: D/dalvikvm(17948): GC_FOR_ALLOC freed 443K, 62% free 4280K/11180K, paused 15ms, total 15ms
06-17 18:44:14.459: D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.handleDeltaUpdate in WLDirectUpdateDownloader.java:392 :: Differential Direct Update - delta package detected
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): WLDirectUpdateDownloader.handleDeltaUpdate in WLDirectUpdateDownloader.java:410 :: Can't copy web resources:
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): java.io.FileNotFoundException: www/default/index.html~
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.openAsset(Native Method)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.open(AssetManager.java:316)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.content.res.AssetManager.open(AssetManager.java:290)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.copyListFromAssets(WLDirectUpdateDownloader.java:472)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.handleDeltaUpdate(WLDirectUpdateDownloader.java:406)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.extractZipFile(WLDirectUpdateDownloader.java:352)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.startDirectUpdate(WLDirectUpdateDownloader.java:96)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.doInBackground(WLDirectUpdateDownloader.java:83)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at com.worklight.androidgap.directupdate.WLDirectUpdateDownloader.doInBackground(WLDirectUpdateDownloader.java:49)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 18:44:14.489: E/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader(17948): at java.lang.Thread.run(Thread.java:841)
06-17 18:44:15.499: W/PluginManager(17948): THREAD WARNING: exec() call to WLDirectUpdatePlugin.hideProgressDialog blocked the main thread for 1007ms. Plugin should use CordovaInterface.getThreadPool().
The recommendation is to update to the latest available patch level (iFix) from IBM Fix Central, and re-build the application (make sure to first up the version in the descriptor.xml and release a new version to the app stores, to account for changes in the native resources of the application).
Related
This is interesting and weird issue.
First I created Cordova project locally. I'm not using Bd.
using
cordova create test com.test.project.story "Test"
Which worked successfully!
Then I added android platform, using
cordova platform add android
Worked successfully.
Then I built the project using
cordova build
Worked, again.
I opened the project from Eclipse and ran it on emulator.
Worked properly.
Then I thought of adding some plugins in my project using
cordova plugin add org.apache.cordova.file
cordova plugin add org.apache.cordova.media
Removed the android platform and added the platform again. Then built and ran the project on emulator.
The screen was stuck on Connecting to device forever.
I rechecked if I was using the correct cordova.js for android platform.
It is correct, and it says
// Platform: android
// 3.5.0
Checked ADB log and there are a lot of suspicious things going on.
D/CordovaWebViewClient( 1581): onPageFinished(file:///android_asset/www/index.html)
D/CordovaActivity( 1581): onMessage(onPageFinished,file:///android_asset/www/index.html)
D/CordovaActivity( 1581): onMessage(spinner,stop)
D/TilesManager( 1581): new EGLContext from framework: 2a1a2a10
D/GLWebViewState( 1581): Reinit shader
D/dalvikvm( 270): GC_CONCURRENT freed 322K, 46% free 9831K/17991K, paused 813ms+21ms, total 2252ms
D/dalvikvm( 270): WAIT_FOR_CONCURRENT_GC blocked 906ms
D/GLWebViewState( 1581): Reinit transferQueue
W/ApplicationContext( 1581): Unable to create external files directory
D/ ( 1581): HostConnection::get() New Host Connection established 0x4a5f8558, tid 1605
E/PluginManager( 1581): Uncaught exception from plugin
E/PluginManager( 1581): java.lang.NullPointerException
E/PluginManager( 1581): at org.apache.cordova.file.FileUtils.requestAllPaths(FileUtils.java:866)
E/PluginManager( 1581): at org.apache.cordova.file.FileUtils.execute(FileUtils.java:348)
E/PluginManager( 1581): at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
E/PluginManager( 1581): at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
E/PluginManager( 1581): at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
E/PluginManager( 1581): at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
E/PluginManager( 1581): at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:227)
E/PluginManager( 1581): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655)
E/PluginManager( 1581): at android.os.Handler.dispatchMessage(Handler.java:99)
E/PluginManager( 1581): at android.os.Looper.loop(Looper.java:137)
E/PluginManager( 1581): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/PluginManager( 1581): at java.lang.reflect.Method.invokeNative(Native Method)
E/PluginManager( 1581): at java.lang.reflect.Method.invoke(Method.java:511)
E/PluginManager( 1581): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/PluginManager( 1581): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/PluginManager( 1581): at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 270): GC_FOR_ALLOC freed 593K, 48% free 9509K/17991K, paused 275ms, total 280ms
I/dalvikvm-heap( 270): Grow heap (frag case) to 10.559MB for 1286224-byte allocation
D/dalvikvm( 270): GC_FOR_ALLOC freed 2K, 41% free 10763K/17991K, paused 182ms, total 186ms
D/dalvikvm( 270): GC_CONCURRENT freed 61K, 38% free 11284K/17991K, paused 41ms+11ms, total 304ms
D/CordovaActivity( 1581): onMessage(spinner,stop)
D/dalvikvm( 270): GC_CONCURRENT freed 2676K, 43% free 10293K/17991K, paused 16ms+29ms, total 130ms
D/CordovaLog( 1581): file:///android_asset/www/cordova.js: Line 1154 : deviceready has not fired after 5 seconds.
I/Web Console( 1581): deviceready has not fired after 5 seconds. at file:///android_asset/www/cordova.js:1154
D/CordovaLog( 1581): file:///android_asset/www/cordova.js: Line 1147 : Channel not fired: onFileSystemPathsReady
I/Web Console( 1581): Channel not fired: onFileSystemPathsReady at file:///android_asset/www/cordova.js:1147
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
D/dalvikvm( 251): GC_CONCURRENT freed 384K, 9% free 6556K/7175K, paused 7ms+5ms, total 67ms
D/dalvikvm( 251): GC_CONCURRENT freed 384K, 9% free 6556K/7175K, paused 6ms+13ms, total 62ms
I/EventLogService( 240): Aggregate from 1403981475023 (log), 1403981475023 (data)
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
What's going on here?
UPDATE:
Works fine on iOS.
I ran into the same issue.
What worked for me was using a different version of the File plugin found here:
https://github.com/onflapp/cordova-plugin-file
Related topic: Cordova File plugin never becomes ready in Android
for me it got solved by adding cordova.js in index.html( though its not required in ripple)
<script src="cordova.js"></script>
I ran into the same and resolved using apache official dev build File plugin:
https://github.com/apache/cordova-plugin-file/
Funny enough cordova release 1.3.1-dev is more stable then official release 1.2.0 ...
By now a newer version of the file plugin has been released. You should no longer experience the issue with the updated version (and there is thus no longer a need to downgrade).
I had a similar issue. deviceReady event was not firing (ionic app on android). Worked after I removed the file plugin v1.2 and then added v1.1 instead.
I am trying to connect to a remote mySQL database which is hosted on my own system means the localhost. I am pasting the code for the whole class here so please see if there is a bug in it. The problem that I am facing is mentioned below the class code.
Code for the class goes here:
public class Login extends Activity implements OnClickListener {
private EditText user, pass;
private Button mSubmit, mRegister;
// Progress Dialog
private ProgressDialog pDialog;
// JSON parser class
JSONParser jsonParser = new JSONParser();
private static final String LOGIN_URL="http://127.0.0.1:8080/webservice/login.php";
private static final String TAG_SUCCESS = "success";
private static final String TAG_MESSAGE = "message";
#Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
// setup input fields
user = (EditText) findViewById(R.id.username);
pass = (EditText) findViewById(R.id.password);
// setup buttons
mSubmit = (Button) findViewById(R.id.login);
mRegister = (Button) findViewById(R.id.register);
// register listeners
mSubmit.setOnClickListener(this);
mRegister.setOnClickListener(this);
}
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.login:
new AttemptLogin().execute();
break;
case R.id.register:
Intent i = new Intent(this, Register.class);
startActivity(i);
break;
default:
break;
}
}
class AttemptLogin extends AsyncTask<String, String, String> {
#Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(Login.this);
pDialog.setMessage("Attempting login...");
pDialog.setIndeterminate(false);
pDialog.setCancelable(true);
pDialog.show();
}
#Override
protected String doInBackground(String... args) {
// TODO Auto-generated method stub
// Check for success tag
int success;
String username = user.getText().toString();
String password = pass.getText().toString();
try {
// Building Parameters
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("username", username));
params.add(new BasicNameValuePair("password", password));
Log.d("request!", "starting");
// getting product details by making HTTP request
JSONObject json = jsonParser.makeHttpRequest(LOGIN_URL, "POST",
params);
// check your log for json response
Log.d("Login attempt", "login attempt");
// json success tag
success = json.getInt(TAG_SUCCESS);
if (success == 1) {
Log.d("Login Successful!", json.toString());
// save user data
SharedPreferences sp = PreferenceManager
.getDefaultSharedPreferences(Login.this);
Editor edit = sp.edit();
edit.putString("username", username);
edit.commit();
Intent i = new Intent(Login.this, ReadComments.class);
finish();
startActivity(i);
return json.getString(TAG_MESSAGE);
} else {
Log.d("Login Failure!", json.getString(TAG_MESSAGE));
return json.getString(TAG_MESSAGE);
}
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
protected void onPostExecute(String file_url) {
// dismiss the dialog once product deleted
pDialog.dismiss();
if (file_url != null) {
Toast.makeText(Login.this, file_url, Toast.LENGTH_LONG).show();
}
}
}
}
The application crashes after showing the "Attempting log in" dialog with the message "Database is closed". I am including the information from catlog here so give it a look if it helps.
06-17 03:19:18.309: D/dalvikvm(2019): GC_FOR_ALLOC freed 161K, 8% free 2971K/3224K, paused 35ms, total 49ms
06-17 03:19:18.429: D/request!(2019): starting
06-17 03:19:18.459: I/Choreographer(2019): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.609: I/Choreographer(2019): Skipped 129 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.669: I/Choreographer(2019): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.739: I/Choreographer(380): Skipped 61 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.819: I/Choreographer(380): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.909: I/Choreographer(2019): Skipped 164 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.929: I/Choreographer(380): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:18.939: I/Choreographer(2019): Skipped 33 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.039: I/Choreographer(2019): Skipped 30 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.299: I/Choreographer(2019): Skipped 32 frames! The application may be doing too much work on its main thread.
06-17 03:19:19.399: I/Choreographer(2019): Skipped 56 frames! The application may be doing too much work on its main thread.
06-17 03:19:20.819: I/Choreographer(2019): Skipped 42 frames! The application may be doing too much work on its main thread.
06-17 03:19:20.889: I/Choreographer(2019): Skipped 32 frames! The application may be doing too much work on its main thread.
06-17 03:19:21.749: I/Choreographer(2019): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:21.879: I/Choreographer(2019): Skipped 48 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.449: I/Choreographer(2019): Skipped 52 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.749: W/System.err(2019): org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:8080 refused
06-17 03:19:22.779: I/Choreographer(2019): Skipped 55 frames! The application may be doing too much work on its main thread.
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
06-17 03:19:22.989: W/System.err(2019): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
06-17 03:19:23.029: I/Choreographer(2019): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
06-17 03:19:23.279: W/System.err(2019): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.JSONParser.makeHttpRequest(JSONParser.java:110)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:121)
06-17 03:19:23.289: W/System.err(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:1)
06-17 03:19:23.289: W/System.err(2019): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 03:19:23.289: W/System.err(2019): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 03:19:23.289: W/System.err(2019): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 03:19:23.289: W/System.err(2019): at java.lang.Thread.run(Thread.java:841)
06-17 03:19:23.319: I/Choreographer(2019): Skipped 42 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.739: W/System.err(2019): Caused by: java.net.ConnectException: failed to connect to /127.0.0.1 (port 8080): connect failed: ECONNREFUSED (Connection refused)
06-17 03:19:23.739: W/System.err(2019): at libcore.io.IoBridge.connect(IoBridge.java:114)
06-17 03:19:23.739: W/System.err(2019): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
06-17 03:19:23.759: W/System.err(2019): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
06-17 03:19:23.769: W/System.err(2019): at java.net.Socket.connect(Socket.java:843)
06-17 03:19:23.769: W/System.err(2019): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
06-17 03:19:23.769: W/System.err(2019): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
06-17 03:19:23.769: W/System.err(2019): ... 15 more
06-17 03:19:23.769: W/System.err(2019): Caused by: libcore.io.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
06-17 03:19:23.829: I/Choreographer(2019): Skipped 84 frames! The application may be doing too much work on its main thread.
06-17 03:19:23.839: W/System.err(2019): at libcore.io.Posix.connect(Native Method)
06-17 03:19:23.839: W/System.err(2019): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
06-17 03:19:23.849: W/System.err(2019): at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
06-17 03:19:23.849: W/System.err(2019): at libcore.io.IoBridge.connect(IoBridge.java:112)
06-17 03:19:23.849: W/System.err(2019): ... 20 more
06-17 03:19:23.849: E/Buffer Error(2019): Error converting result java.lang.NullPointerException: lock == null
06-17 03:19:23.879: I/Choreographer(2019): Skipped 49 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.439: I/Choreographer(2019): Skipped 31 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.499: I/Choreographer(2019): Skipped 34 frames! The application may be doing too much work on its main thread.
06-17 03:19:24.569: E/JSON Parser(2019): Error parsing data org.json.JSONException: End of input at character 0 of
06-17 03:19:24.569: D/Login attempt(2019): login attempt
06-17 03:19:25.019: W/dalvikvm(2019): threadid=11: thread exiting with uncaught exception (group=0xb4a8aba8)
06-17 03:19:25.199: E/AndroidRuntime(2019): FATAL EXCEPTION: AsyncTask #1
06-17 03:19:25.199: E/AndroidRuntime(2019): Process: com.example.mysqltest, PID: 2019
06-17 03:19:25.199: E/AndroidRuntime(2019): java.lang.RuntimeException: An error occured while executing doInBackground()
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$3.done(AsyncTask.java:300)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.lang.Thread.run(Thread.java:841)
06-17 03:19:25.199: E/AndroidRuntime(2019): Caused by: java.lang.NullPointerException
06-17 03:19:25.199: E/AndroidRuntime(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:128)
06-17 03:19:25.199: E/AndroidRuntime(2019): at com.example.mysqltest.Login$AttemptLogin.doInBackground(Login.java:1)
06-17 03:19:25.199: E/AndroidRuntime(2019): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-17 03:19:25.199: E/AndroidRuntime(2019): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-17 03:19:25.199: E/AndroidRuntime(2019): ... 4 more
06-17 03:19:25.229: I/Choreographer(2019): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.279: W/ActivityManager(380): Force finishing activity com.example.mysqltest/.Login
06-17 03:19:25.309: D/gralloc(51): Registering a buffer in the process that created it. This may cause memory ordering problems.
06-17 03:19:25.309: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.309: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/SurfaceFlinger(51): glCheckFramebufferStatusOES error 886920962
06-17 03:19:25.319: E/SurfaceFlinger(51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.319: E/libEGL(51): called unimplemented OpenGL ES API
06-17 03:19:25.329: I/Choreographer(2019): Skipped 91 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.359: W/WindowManager(380): Screenshot failure taking screenshot for (123x221) to layer 21015
06-17 03:19:25.589: I/Choreographer(380): Skipped 92 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.599: I/Choreographer(2019): Skipped 203 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.669: I/Choreographer(2019): Skipped 65 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.719: I/Choreographer(380): Skipped 115 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.779: I/Choreographer(2019): Skipped 92 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.839: I/Choreographer(542): Skipped 288 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.869: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.939: I/Choreographer(380): Skipped 45 frames! The application may be doing too much work on its main thread.
06-17 03:19:25.939: I/Choreographer(2019): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.069: I/Choreographer(380): Skipped 124 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.119: I/Choreographer(380): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.129: I/Choreographer(2019): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.169: I/Choreographer(2019): Skipped 30 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.259: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.269: I/Choreographer(2019): Skipped 89 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.309: I/Choreographer(380): Skipped 35 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.319: I/Choreographer(2019): Skipped 46 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.369: I/Choreographer(380): Skipped 46 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.379: I/Choreographer(2019): Skipped 54 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.469: I/Choreographer(2019): Skipped 80 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.499: I/Choreographer(380): Skipped 115 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.589: I/Choreographer(2019): Skipped 116 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.619: I/Choreographer(380): Skipped 80 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.689: I/Choreographer(380): Skipped 37 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.849: I/Choreographer(380): Skipped 77 frames! The application may be doing too much work on its main thread.
06-17 03:19:26.939: I/Choreographer(380): Skipped 43 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.009: I/Choreographer(380): Skipped 41 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.169: I/Choreographer(380): Skipped 36 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.349: E/WindowManager(2019): android.view.WindowLeaked: Activity com.example.mysqltest.Login has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{b4d95578 V.E..... R.....ID 0,0-228,72} that was originally added here
06-17 03:19:27.349: E/WindowManager(2019): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:348)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
06-17 03:19:27.349: E/WindowManager(2019): at android.app.Dialog.show(Dialog.java:286)
06-17 03:19:27.349: E/WindowManager(2019): at com.example.mysqltest.Login$AttemptLogin.onPreExecute(Login.java:103)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:587)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.AsyncTask.execute(AsyncTask.java:535)
06-17 03:19:27.349: E/WindowManager(2019): at com.example.mysqltest.Login.onClick(Login.java:82)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.View.performClick(View.java:4438)
06-17 03:19:27.349: E/WindowManager(2019): at android.view.View$PerformClick.run(View.java:18422)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Handler.handleCallback(Handler.java:733)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Handler.dispatchMessage(Handler.java:95)
06-17 03:19:27.349: E/WindowManager(2019): at android.os.Looper.loop(Looper.java:136)
06-17 03:19:27.349: E/WindowManager(2019): at android.app.ActivityThread.main(ActivityThread.java:5017)
06-17 03:19:27.349: E/WindowManager(2019): at java.lang.reflect.Method.invokeNative(Native Method)
06-17 03:19:27.349: E/WindowManager(2019): at java.lang.reflect.Method.invoke(Method.java:515)
06-17 03:19:27.349: E/WindowManager(2019): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
06-17 03:19:27.349: E/WindowManager(2019): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
06-17 03:19:27.349: E/WindowManager(2019): at dalvik.system.NativeStart.main(Native Method)
06-17 03:19:27.359: I/Choreographer(2019): Skipped 273 frames! The application may be doing too much work on its main thread.
06-17 03:19:27.449: I/Choreographer(2019): Skipped 85 frames! The application may be doing too much work on its main thread.
06-17 03:20:10.919: D/LightsService(380): Excessive delay setting light: 89ms
Please note that the about catlog information is after I press the login button.
Please, check mysql-service is running or not.
If no then service is stop, then check space available at harddisk.
If space is not availbale then try to increase free space or increase
hard disk space, then restart mysql service.
My problem is that I used to have the super.Loadurl code with cordova leading to the file:///android_asset/ directory, and it worked fine.. everything was 100% , took a bit to load but it was working fine. I then made my files hosted on my website to take off the whopping 197mb off the app to make it lighter and uploadable, but it gave me a "Application error- the connection to the server was unsuccessful" I then tried using the "webview" code and used it with the example "www.google.com" , that worked fine. I tried using my site, and it would change the color of the screen to the bg in my site, BUT nothing else would show up. So then I tried making a simple html file with just a small text and changed the index.html to it, and it loaded the text fine.. I'm lost, I have no idea what to try or what to do. Please someone lead me in the right direction.
`110-06 12:15:26.355: D/dalvikvm(1102): GC_FOR_ALLOC freed 46K, 5% free 2933K/3084K, paused 61ms, total 63ms
10-06 12:15:26.565: D/dalvikvm(1102): GC_FOR_ALLOC freed 291K, 12% free 3156K/3548K, paused 18ms, total 20ms
10-06 12:15:26.604: D/dalvikvm(1102): GC_FOR_ALLOC freed 2K, 9% free 3258K/3548K, paused 25ms, total 26ms
10-06 12:15:26.604: I/dalvikvm-heap(1102): Grow heap (frag case) to 4.353MB for 1127536-byte allocation
10-06 12:15:26.654: D/dalvikvm(1102): GC_FOR_ALLOC freed <1K, 7% free 4359K/4652K, paused 43ms, total 43ms
10-06 12:15:27.074: E/ActivityThread(1102): Failed to find provider info for com.google.plus.platform
10-06 12:15:27.084: I/Ads(1102): To get test ads on this device, call adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
10-06 12:15:27.714: D/dalvikvm(1102): DexOpt: --- BEGIN 'ads1928896260.jar' (bootstrap=0) ---
10-06 12:15:27.734: D/dalvikvm(1102): GC_FOR_ALLOC freed 322K, 9% free 4657K/5080K, paused 107ms, total 111ms
10-06 12:15:27.734: I/Choreographer(1102): Skipped 51 frames! The application may be doing too much work on its main thread.
10-06 12:15:27.994: D/gralloc_goldfish(1102): Emulator without GPU emulation detected.
10-06 12:15:28.084: D/dalvikvm(1102): DexOpt: --- END 'ads1928896260.jar' (success) ---
10-06 12:15:28.084: D/dalvikvm(1102): DEX prep '/data/data/com.croruptdesigns.gtav_themanual/cache/ads1928896260.jar': unzip in 1ms, rewrite 362ms
10-06 12:15:28.335: I/Ads(1102): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_getSdkConstants();AFMA_buildAdURL({"preqs":0,"session_id":"17339870006830476368","seq_num":"1","slotname":"a1524e277372095","u_w":384,"msid":"com.croruptdesigns.gtav_themanual","cap":"m,a","js":"afma-sdk-a-v6.4.1","bas_off":0,"net":"ed","app_name":"1.android.com.croruptdesigns.gtav_themanual","hl":"en","gnt":3,"carrier":"310260","u_audio":4,"kw":[],"u_sd":2,"simulator":1,"ms":"CGmAthrKkyRp6xWcusoVxk_ntS2ZN59H63Qd8Jjg0ndLToWFNwJl32PSa2X8m09vF106i8Jsf_2BuJ6sG8m0duqbSvh8sZ7wgCPg5Rd7Tvxb63ZyO_lYyx7SMxpGtRjsleR2hmBLkYsdXrymwWPZDidE1qlU-Ahhjj8WjSrOPeHz7UpgEfKdxe35Xsk9iIqZoGkqf_QBAINQO63dItJW95a3d0jl9R9CLcmrNoZUTC4JSY6KVJIuvXYBBcRst9hy8sGl7Mkmt399rTsYelv_ZNU_NGTiz8OkaWBfVgvzeqhxSmgN5Eabfs_bdWsuQfB9W7sfVGqVAgnBHg2KPZ1mnw","isu":"B3EEABB8EE11C2BE770B684D95219ECB","format":"320x50_mb","oar":0,"ad_pos":{"height":0,"visible":1,"y":1152,"x":736,"width":0},"u_h":592,"pt":1,"bas_on":0,"ptime":0});</script></head><body></body></html>
10-06 12:15:29.984: I/Ads(1102): Received ad url: <url: "http://googleads.g.doubleclick.net:80/mads/gma?preqs=0&session_id=17339870006830476368&seq_num=1&u_w=384&msid=com.croruptdesigns.gtav_themanual&cap=m%2Ca&js=afma-sdk-a-v6.4.1&bas_off=0&net=ed&app_name=1.android.com.croruptdesigns.gtav_themanual&hl=en&gnt=3&carrier=310260&u_audio=4&kw&u_sd=2&ms=CGmAthrKkyRp6xWcusoVxk_ntS2ZN59H63Qd8Jjg0ndLToWFNwJl32PSa2X8m09vF106i8Jsf_2BuJ6sG8m0duqbSvh8sZ7wgCPg5Rd7Tvxb63ZyO_lYyx7SMxpGtRjsleR2hmBLkYsdXrymwWPZDidE1qlU-Ahhjj8WjSrOPeHz7UpgEfKdxe35Xsk9iIqZoGkqf_QBAINQO63dItJW95a3d0jl9R9CLcmrNoZUTC4JSY6KVJIuvXYBBcRst9hy8sGl7Mkmt399rTsYelv_ZNU_NGTiz8OkaWBfVgvzeqhxSmgN5Eabfs_bdWsuQfB9W7sfVGqVAgnBHg2KPZ1mnw&format=320x50_mb&oar=0&u_h=592&bas_on=0&ptime=0&imbf=%40installed_markets%40&u_so=p&output=html®ion=mobile_app&u_tz=-240&client_sdk=1&ex=1&slotname=a1524e277372095&kw_type=broad&gsb=3g&caps=inlineVideo_interactiveVideo_mraid1_th_autoplay_mediation_sdkAdmobApiForAds_di&eisu=gkAjAmBMj3pCXLD39t1g2jfXkfrdgaKxkUlUxErHyL8lbW_DZ0Ax-0lWPhmyI4kVmCb2BcERmMkOa1W4aP02QZQuDw2BKjE_biobCXoJnC_R0BL3LCfhPy1JOkAAUEIy&et=58&jsv=56" type: "admob" afmaNotifyDt: "null" activationOverlayUrl: "null" useWebViewLoadUrl: "false">
10-06 12:15:30.034: I/Ads(1102): Ad url modified to http://googleads.g.doubleclick.net:80/mads/gma?preqs=0&session_id=17339870006830476368&seq_num=1&u_w=384&msid=com.croruptdesigns.gtav_themanual&cap=m%2Ca&js=afma-sdk-a-v6.4.1&bas_off=0&net=ed&app_name=1.android.com.croruptdesigns.gtav_themanual&hl=en&gnt=3&carrier=310260&u_audio=4&kw&u_sd=2&ms=CGmAthrKkyRp6xWcusoVxk_ntS2ZN59H63Qd8Jjg0ndLToWFNwJl32PSa2X8m09vF106i8Jsf_2BuJ6sG8m0duqbSvh8sZ7wgCPg5Rd7Tvxb63ZyO_lYyx7SMxpGtRjsleR2hmBLkYsdXrymwWPZDidE1qlU-Ahhjj8WjSrOPeHz7UpgEfKdxe35Xsk9iIqZoGkqf_QBAINQO63dItJW95a3d0jl9R9CLcmrNoZUTC4JSY6KVJIuvXYBBcRst9hy8sGl7Mkmt399rTsYelv_ZNU_NGTiz8OkaWBfVgvzeqhxSmgN5Eabfs_bdWsuQfB9W7sfVGqVAgnBHg2KPZ1mnw&format=320x50_mb&oar=0&u_h=592&bas_on=0&ptime=0&imbf=8008&u_so=p&output=html®ion=mobile_app&u_tz=-240&client_sdk=1&ex=1&slotname=a1524e277372095&kw_type=broad&gsb=3g&caps=inlineVideo_interactiveVideo_mraid1_th_autoplay_mediation_sdkAdmobApiForAds_di&eisu=gkAjAmBMj3pCXLD39t1g2jfXkfrdgaKxkUlUxErHyL8lbW_DZ0Ax-0lWPhmyI4kVmCb2BcERmMkOa1W4aP02QZQuDw2BKjE_biobCXoJnC_R0BL3LCfhPy1JOkAAUEIy&et=58&jsv=56
10-06 12:15:30.034: I/Ads(1102): Request scenario: Online server request.
10-06 12:15:32.784: D/webviewglue(1102): nativeDestroy view: 0x2a1bf608
10-06 12:15:32.784: I/Ads(1102): onReceiveAd()
10-06 12:15:33.204: E/cutils-trace(1102): Error opening trace file: No such file or directory (2)
10-06 12:15:33.245: D/TilesManager(1102): Starting TG #0, 0x2a282a68
10-06 12:16:32.485: D/CordovaActivity(1102): Setting integer properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml
10-06 12:16:32.565: D/CordovaWebView(1102): CordovaWebView is running on device made by: unknown
10-06 12:16:32.585: D/JsMessageQueue(1102): Set native->JS mode to 2
10-06 12:16:32.614: E/PluginManager(1102): =====================================================================================
10-06 12:16:32.614: E/PluginManager(1102): ERROR: config.xml is missing. Add res/xml/plugins.xml to your project.
10-06 12:16:32.614: E/PluginManager(1102): https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/res/xml/plugins.xml
10-06 12:16:32.614: E/PluginManager(1102): =====================================================================================`
`import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import org.apache.cordova.*;
import com.google.ads.AdSize;
import com.google.ads.AdView;
public class Manual extends DroidGap {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("loadUrlTimeoutValue", 60000);
super.loadUrl("http://croruptdesigns.com/gta/index.html");
}
}
I have written GAE cloud endpoint APIs and have successfully deployed them to App Engine. The APIs run successfully locally as well as after deployment on App Engine.
After generating cloud endpoints, i tried to call one of the APIs in my Android client and it throws "GoogleJSONResponseException 404 not found" exception. In the API method, I am using HttpURLConnection and JAXB unmarshaller to call a URL and unmarshall the XML response. The code is as follows:
String uri=<some url>;
URL url = new URL(uri);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Accept", "application/xml");
JAXBContext jc = JAXBContext.newInstance(MyResponse.class);
InputStream xml = connection.getInputStream();
response = (MyResponse) jc.createUnmarshaller().unmarshal(xml);
connection.disconnect();
Why does this not work only when trying to call from the android client using the endpoint client library? Am i doing something wrong?
Note: I called another API in the same android client which just inserts data into the datastore and it works fine
The LogCat console looks as follows:
06-17 11:44:49.081: W/System.err(2035): com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
06-17 11:44:49.081: W/System.err(2035): Not Found
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:111)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:38)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:314)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1060)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:412)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:345)
06-17 11:44:49.081: W/System.err(2035): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:463)
06-17 11:44:49.081: W/System.err(2035): at com.niru.i_collect.RegistrationActivity$FindAddressTask.doInBackground(RegistrationActivity.java:296)
06-17 11:44:49.081: W/System.err(2035): at com.niru.i_collect.RegistrationActivity$FindAddressTask.doInBackground(RegistrationActivity.java:1)
06-17 11:44:49.081: W/System.err(2035): at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-17 11:44:49.081: W/System.err(2035): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-17 11:44:49.081: W/System.err(2035): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-17 11:44:49.081: W/System.err(2035): at java.lang.Thread.run(Thread.java:856)
There is a weird bug in App Engine. It seems that when this happens, you have to go to the App Engine Console -> Main -> Versions.
There you will see a list of versions with a Make Default button below. Select the radio button for the latest version and press the make default button, wait a minute or so, and try your call again.
Note that even if you have only one version that is already set as the default this solution should still work.
You may have to do this again the next time you deploy to app engine.
I had created a Phonegap android project in which I am trying to read a QRCode.For that I had included the library project Of BarcodeScanner from here https://github.com/wildabeast/BarcodeScanner .
But while I am trying to add this library to my PhoneGap Project , Initially it shows green symbol but after that it turns in red cross.
I think because of that I am getting this log in Logcat :
05-1512:48:37.489:D/DroidGap(863):onMessage(onPageFinished,file:///android_asset/www/index.html)
05-15 12:48:37.749: D/CordovaNetworkManager(863): Connection Type: 3g
05-15 12:48:37.749: D/DroidGap(863): onMessage(networkconnection,3g)
05-15 12:48:37.758: D/CordovaNetworkManager(863): Connection Type: 3g
05-15 12:48:37.768: D/DroidGap(863): onMessage(spinner,stop)
05-15 12:48:38.138: D/dalvikvm(863): GC_FOR_ALLOC freed 222K, 4% free 8166K/8455K, paused 40ms, total 43ms
05-15 12:48:39.579: D/DroidGap(863): onMessage(spinner,stop)
05-15 12:48:42.718: I/Choreographer(863): Skipped 30 frames! The application may be doing too much work on its main thread.
05-15 12:48:44.508: D/CordovaLog(863): Uncaught module cordova/plugin/BarcodeScanner not found
05-15 12:48:44.508: E/Web Console(863): Uncaught module cordova/plugin/BarcodeScanner not found at file:///android_asset/www/cordova-2.6.0.js:50
So I got stuck here.Any suggestion ?