[TIMOB-23574] Android error Unable to start activity ComponentInfo
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | n/a |
| Reporter | Andrea |
| Assignee | Maggie Chen |
| Created | 2016-06-27T21:45:05.000+0000 |
| Updated | 2017-10-30T18:38:02.000+0000 |
Description
var pWidth = Ti.Platform.displayCaps.platformWidth;
var pHeight = Ti.Platform.displayCaps.platformHeight;
var winAccetta = Titanium.UI.createWindow({
width:pWidth,
height:pHeight,
navBarHidden:true,
backgroundColor: 'white',
layout:'vertical',
fullscreen: true,
orientationModes: [Ti.UI.PORTRAIT],
exitOnClose: true,
title: 'BS Root'
});
var client = Ti.Network.createHTTPClient({
// function called when the response data is available
onload : function(e) {
Ti.API.info("Received text: " + this.responseText);
var tableView = Ti.UI.createTableView({separatorStyle: Ti.UI.iPhone.TableViewSeparatorStyle.SINGLE_LINE});
winAccetta.add(tableView);
winAccetta.navBarHidden = true;
var licenza = Titanium.UI.createLabel({
width:Ti.UI.FILL,
top:30,
left:10,
height:'auto',
font : {
fontSize : 11,
fontFamily : 'Arial'
},
text: "-------PROVA-------"
});
winAccetta.add(licenza);
//
winAccetta.open();
},
// function called when an error occurs, including a timeout
onerror : function(e) {
Ti.API.debug(e.error);
alert('error');
},
timeout : 5000 // in milliseconds
});
// Prepare the connchection.
client.open("POST", url);
// client.open("GET", url);
client.send({
"type" : "getcategories",
"sourcetype" : "source_app",
});
[ERROR] : Zygote: MountEmulatedStorage() [INFO] : SELinux: Function: selinux_compare_spd_ram, SPD-policy is existed. and_ver=SEPF_SM-J120FN_5.1.1 ver=51 [ERROR] : Zygote: v2 [ERROR] : Zygote: accessInfo : 0 [ERROR] : SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL [ERROR] : MotionRecognitionManager: mSContextService = null [ERROR] : MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@2ed1b876 [DEBUG] : AndroidRuntime: Shutting down VM [ERROR] : TiApplication: (main) [1374,1374] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.com.provamobile/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null; Titanium 5.3.0,2016/06/01 10:18,94fa8af [ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.com.provamobile/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3133) [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3243) [ERROR] : TiApplication: at android.app.ActivityThread.access$1000(ActivityThread.java:218) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:145) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6917) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) [ERROR] : TiApplication: Caused by: java.lang.NumberFormatException: Unable to convert null [ERROR] : TiApplication: at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:412) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableView.
After debugging many days my code I thing that it is no more possibile to open a window inside a new thread
Hello, Using the above code with url as https://www.google.com/ I got the below error. My Window never opens.
I can't understand your answer, do you want me to suggest you something? I have another url that I can't give you and I receive the answer, but you also should know how to use appcelerator methods. Can you help me to understand what help I can give you?
I tried to launch the script from another mac, but I still have the same error. Could you please help me?
I don't know why google doesn't work, maybe cause it is a https connection and the method works only with http...
After I bumped my app's Ti SDK to 6.2.0.GA, my app is crashing on loading. Log shows something about Number casting, but I can't find where it is. Already replaced every String.format() line with a cast to string inside the method... App was working fine with previous versions, so I need some help to find where this bug lies... Below is the logcat I'm facing:
Thanks in advance!-- Start application log ----------------------------------------------------- [INFO] TiApplication: (main) [1,1] checkpoint, app created. [INFO] TiApplication: (main) [149,150] Titanium 6.2.0 (2017/09/12 20:39 undefined) [INFO] MultiDex: VM with version 2.1.0 has multidex support [INFO] MultiDex: install [INFO] MultiDex: VM has multidex support, MultiDex support library is disabled. [INFO] TiApplication: (main) [118,268] Titanium Javascript runtime: v8 [ERROR] linker: readlink('/proc/self/fd/20') failed: Permission denied [fd=20] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libc++_shared.so". Will use given name. [ERROR] linker: readlink('/proc/self/fd/20') failed: Permission denied [fd=20] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libkroll-v8.so". Will use given name. [DEBUG] PushnotificationsModule: (main) [41,309] inside onAppCreate [DEBUG] SwiperefreshlayoutModule: (main) [1,310] inside onAppCreate [DEBUG] TiAdsModule: (main) [8,318] Initializing tiads module. [WARN] TiAndroid: (KrollRuntimeThread) [435,753] Application instance no longer available. Unable to get current activity. [WARN] TiAndroid: (KrollRuntimeThread) [2,755] Application instance no longer available. Unable to get current activity. [WARN] TiAndroid: (KrollRuntimeThread) [1,756] Application instance no longer available. Unable to get current activity. [ERROR] linker: readlink('/proc/self/fd/24') failed: Permission denied [fd=24] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libcom.alcoapps.actionbarextras.so". Will use given name. [ERROR] linker: readlink('/proc/self/fd/24') failed: Permission denied [fd=24] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libcom.pushwoosh.module.so". Will use given name. [ERROR] linker: readlink('/proc/self/fd/24') failed: Permission denied [fd=24] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libninja.ygor.tiads.so". Will use given name. [ERROR] linker: readlink('/proc/self/fd/24') failed: Permission denied [fd=24] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libti.map.so". Will use given name. [ERROR] linker: readlink('/proc/self/fd/24') failed: Permission denied [fd=24] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libcom.mirasense.scanditsdk.so". Will use given name. [ERROR] linker: readlink('/proc/self/fd/24') failed: Permission denied [fd=24] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libcom.rkam.swiperefreshlayout.so". Will use given name. [ERROR] linker: readlink('/proc/self/fd/24') failed: Permission denied [fd=24] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libti.imagefactory.so". Will use given name. [ERROR] linker: readlink('/proc/self/fd/24') failed: Permission denied [fd=24] [ERROR] linker: warning: unable to get realpath for the library "/data/app/br.com.pinion-1/lib/arm/libfacebook.so". Will use given name. [WARN] art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable [INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null [INFO] --------------------------app.js-begin----------------------------- [DEBUG] PushnotificationsModule: (KrollRuntimeThread) [85,85] Push: create module [DEBUG] PushnotificationsModule: (KrollRuntimeThread) [1,86] Push: init activity! [INFO] --------------------------geo.js-begin----------------------------- [INFO] --------------------------geo.js-end----------------------------- [INFO] --------------------------api.js-begin----------------------------- [INFO] switchApi Method Called! [INFO] https://api.pinion.pt [INFO] --------------------------api.js-end----------------------------- [INFO] --------------------------services.js-begin----------------------------- [INFO] --------------------------services.js-end----------------------------- [INFO] --------------------------login.js-begin----------------------------- [INFO] switchApi Method Called! [INFO] https://api.pinion.pt [INFO] --------------------------ui.js-begin----------------------------- [DEBUG] PushnotificationsModule: (KrollRuntimeThread) [612,698] unregister called [INFO] --------------------------app.js-end----------------------------- [DEBUG] HTTPClient: The persistent handle is disposed. [DEBUG] PushnotificationsModule: (main) [155,853] Push: ACTIVITY STARTED [INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = br.com.pinion.PinionActivity@7141bde [DEBUG] PushnotificationsModule: (main) [1,1] Push: ACTIVITY RESUMED: 1 [DEBUG] PushnotificationsModule: (main) [1,2] Push: unregistering receivers [DEBUG] PushnotificationsModule: (main) [0,2] Push: finished unregistering receivers [DEBUG] PushnotificationsModule: (main) [0,2] Push: register receivers [DEBUG] PushnotificationsModule: (main) [2,4] Push: finished registering receivers [DEBUG] PushnotificationsModule: (main) [1,5] Push: on resume [DEBUG] TiFacebookModule: (main) [0,5] Calling activateApp [DEBUG] OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true [DEBUG] PushnotificationsModule: (main) [42,47] Push: ACTIVITY PAUSED: 0 [DEBUG] PushnotificationsModule: (main) [0,47] Push: unregistering receivers [DEBUG] PushnotificationsModule: (main) [1,48] Push: finished unregistering receivers [DEBUG] PushnotificationsModule: (main) [2,50] Push: on pause [DEBUG] TiFacebookModule: (main) [0,50] Calling deactivateApp [DEBUG] PushnotificationsModule: (main) [34,84] Push: ACTIVITY CREATED [DEBUG] AndroidRuntime: Shutting down VM [ERROR] TiApplication: (main) [16,100] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{br.com.pinion/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null; Titanium 6.2.0,2017/09/12 20:39,undefined [ERROR] TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{br.com.pinion/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null [ERROR] TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2426) [ERROR] TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490) [ERROR] TiApplication: at android.app.ActivityThread.-wrap11(ActivityThread.java) [ERROR] TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:148) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5443) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) [ERROR] TiApplication: Caused by: java.lang.NumberFormatException: Unable to convert null [ERROR] TiApplication: at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:415) [ERROR] TiApplication: at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:448) [ERROR] TiApplication: at ti.modules.titanium.media.TiUIVideoView.processProperties(TiUIVideoView.java:143) [ERROR] TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1222) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:516) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:507) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:485) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:523) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:507) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:485) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:695) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:588) [ERROR] TiApplication: at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:261) [ERROR] TiApplication: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33) [ERROR] TiApplication: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:564) [ERROR] TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:684) [ERROR] TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:21) [ERROR] TiApplication: at android.app.Activity.performCreate(Activity.java:6245) [ERROR] TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130) [ERROR] TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379) [ERROR] TiApplication: ... 9 more [TRACE] updating tiapp metadata with Appcelerator Platform... [TRACE] Uploaded tiapp metadata with Appcelerator Platform!I'm also getting this on 6.2.0.GA as well. On 6.1.2.GA this doesn't happen for me.
[~perdona] Sorry for the inconvenience. I am interested to find out from you, is there any VideoPlayer involved? Is the error reproducible on every device every time? I met the same error once but it can't be reproduced every time. It would be very helpful if anyone could provide the code can reproduce the error.
@Maggie Chen Okay, let's try to find this together. I do use VideoPlayer in my app, but I didn't think this is what's crashing the app... Answering your questions, yes, reproducible on every device every time! I will try to isolate the videoplayer code and remove it from my first loading, and then post an update here! Thanks in advance!
[~perdona] What are you assigning as
repeatModefor your VideoPlayer? You can only use the following:Titanium.Media.VIDEO_REPEAT_MODE_NONE Titanium.Media.VIDEO_REPEAT_MODE_ONETouché! I was using null to (maybe?) workaround some other issue...
Will alter that and post feedback here for you guys! Thanks a lot.repeatMode: (osname == "iphone") ? Ti.Media.VIDEO_REPEAT_MODE_ONE : nullThis should work:
repeatMode: osname == 'iphone' ? Ti.Media.VIDEO_REPEAT_MODE_ONE : Ti.Media.VIDEO_REPEAT_MODE_NONE