[android]storage 加载问题,疑似module未注册 #1200

Closed
pp1232 opened this Issue Sep 10, 2016 · 32 comments

Comments

Projects
None yet
10 participants
@pp1232

pp1232 commented Sep 10, 2016

在android平台中在created和ready中使用storage时经常会报错
image
退出程序,再次启动时候就不会有这个问题了
华为mate7手机
android 4.4版本
通过sdk方式引用weex。

@Jinjiang

This comment has been minimized.

Show comment
Hide comment
@Jinjiang

Jinjiang Sep 10, 2016

Contributor

可以提供一下导致出错的代码片段吗?

Contributor

Jinjiang commented Sep 10, 2016

可以提供一下导致出错的代码片段吗?

@Rowandjj

This comment has been minimized.

Show comment
Hide comment
@Rowandjj

Rowandjj Sep 12, 2016

能不能提供下sdk版本,代码片段?

能不能提供下sdk版本,代码片段?

@pp1232

This comment has been minimized.

Show comment
Hide comment
@pp1232

pp1232 Sep 12, 2016

SDK版本是0.7.0
代码是这样的

var modal=require('@weex-module/modal');
var stream=require('@weex-module/stream') ;
var storage=require('@weex-module/storage');
ready:function(e){
    this.height=this.$getConfig().env.deviceHeight/(this.$getConfig().env.deviceWidth/750);
    this.checkLoginStatus();
},
methods:{
    checkLoginStatus:function(){
        var vm=this;
        vm.showLogout=false;
        var token,uid;
        //获取token
         storage.getItem('token',function(e){
            if(e.result=="success" && e.data){
                token=e.data;
                //获取uid
                storage.getItem('uid',function(e){
                    uid=e.data;
                    if(e.result=="success" && e.data){
                        //从服务器查询用户token是否过期
                        stream.fetch({
                            method:'GET',
                            url:"http://10.179.179.162:3000/user/"+uid+"?_tk="+token,
                            headers:{
                                'Content-Type':'application/json'
                            } ,
                            type:'json',
                        },function(res){
                            if(res.ok){
                                vm.showLogout=true;
                                vm.username=res.data.user.MOBILE;
                            }
                            else{
                                modal.toast({
                                    message:'statuText'+res.statusText,
                                    duration:1,
                                })
                            }
                        },function(res){})
                    }
                })
            }
         }) 
    }
}

pp1232 commented Sep 12, 2016

SDK版本是0.7.0
代码是这样的

var modal=require('@weex-module/modal');
var stream=require('@weex-module/stream') ;
var storage=require('@weex-module/storage');
ready:function(e){
    this.height=this.$getConfig().env.deviceHeight/(this.$getConfig().env.deviceWidth/750);
    this.checkLoginStatus();
},
methods:{
    checkLoginStatus:function(){
        var vm=this;
        vm.showLogout=false;
        var token,uid;
        //获取token
         storage.getItem('token',function(e){
            if(e.result=="success" && e.data){
                token=e.data;
                //获取uid
                storage.getItem('uid',function(e){
                    uid=e.data;
                    if(e.result=="success" && e.data){
                        //从服务器查询用户token是否过期
                        stream.fetch({
                            method:'GET',
                            url:"http://10.179.179.162:3000/user/"+uid+"?_tk="+token,
                            headers:{
                                'Content-Type':'application/json'
                            } ,
                            type:'json',
                        },function(res){
                            if(res.ok){
                                vm.showLogout=true;
                                vm.username=res.data.user.MOBILE;
                            }
                            else{
                                modal.toast({
                                    message:'statuText'+res.statusText,
                                    duration:1,
                                })
                            }
                        },function(res){})
                    }
                })
            }
         }) 
    }
}
@sospartan

This comment has been minimized.

Show comment
Hide comment
@sospartan

sospartan Sep 12, 2016

@pp1232 看错误像是moudle一开始没有注册成功,下一次出现的时候,能抓取一下完整的native log(放到文件里)发上来么

@pp1232 看错误像是moudle一开始没有注册成功,下一次出现的时候,能抓取一下完整的native log(放到文件里)发上来么

@sospartan sospartan self-assigned this Sep 12, 2016

@qbcbyb

This comment has been minimized.

Show comment
Hide comment
@qbcbyb

qbcbyb Sep 12, 2016

这个问题我也经常遇到,在Android应用结束进程后,打开应用的第一个页面时如果在created或者ready里使用module的方法或者setTimeout,都会报错,再打开一次就好了。像是第一次打开app初始化时注册模块过程中尚未完成,第一个页面的created就执行了。

qbcbyb commented Sep 12, 2016

这个问题我也经常遇到,在Android应用结束进程后,打开应用的第一个页面时如果在created或者ready里使用module的方法或者setTimeout,都会报错,再打开一次就好了。像是第一次打开app初始化时注册模块过程中尚未完成,第一个页面的created就执行了。

@sospartan

This comment has been minimized.

Show comment
Hide comment
@sospartan

sospartan Sep 12, 2016

@qbcbyb 碰到的时候把完整日志发一下我吧 理论上不可能会出现这种情况,注册和渲染都是在js线程去排队执行的,只要保障SDK初始化的操作在前,就不会出现先渲染后注册的情况.
所以我得分析一下日志看看,谢谢反馈.

@qbcbyb 碰到的时候把完整日志发一下我吧 理论上不可能会出现这种情况,注册和渲染都是在js线程去排队执行的,只要保障SDK初始化的操作在前,就不会出现先渲染后注册的情况.
所以我得分析一下日志看看,谢谢反馈.

@sospartan sospartan changed the title from storage 加载问题 to [android]storage 加载问题,疑似module未注册 Sep 12, 2016

@qbcbyb

This comment has been minimized.

Show comment
Hide comment
@qbcbyb

qbcbyb Sep 12, 2016

@sospartan ,日志文件:output.txt
看下可用不,本地没有配置debugtool,所以总会提示WXDebugTool not found
不可用的话我再看看能不能加上debugtool之后再试

qbcbyb commented Sep 12, 2016

@sospartan ,日志文件:output.txt
看下可用不,本地没有配置debugtool,所以总会提示WXDebugTool not found
不可用的话我再看看能不能加上debugtool之后再试

@sospartan

This comment has been minimized.

Show comment
Hide comment
@sospartan

sospartan Sep 12, 2016

@qbcbyb 从日志看 注册过程还是正常的,这个日志你应该是过滤过得吧,能把这个app原始的日志给我么

@qbcbyb 从日志看 注册过程还是正常的,这个日志你应该是过滤过得吧,能把这个app原始的日志给我么

@pp1232

This comment has been minimized.

Show comment
Hide comment
@pp1232

pp1232 Sep 12, 2016

@sospartan

09-12 14:14:13.010 21413-21413/com.ces.mob E/weex: launchInspector HackAssertionException com.taobao.weex.utils.WXHack$HackDeclaration$HackAssertionException: java.lang.ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:232)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337)
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223)
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212)
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24)
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369)
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009)
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613)
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139)
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                  at android.os.Looper.loop(Looper.java:136)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314)
                                                                  at java.lang.reflect.Method.invokeNative(Native Method)
                                                                  at java.lang.reflect.Method.invoke(Method.java:515)
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
                                                                  at dalvik.system.NativeStart.main(Native Method)
                                                               Caused by: java.lang.ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy
                                                                  at java.lang.Class.classForName(Native Method)
                                                                  at java.lang.Class.forName(Class.java:251)
                                                                  at java.lang.Class.forName(Class.java:216)
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
                                                               Caused by: java.lang.NoClassDefFoundError: com/taobao/weex/devtools/debug/DebugServerProxy
                                                                  at java.lang.Class.classForName(Native Method) 
                                                                  at java.lang.Class.forName(Class.java:251) 
                                                                  at java.lang.Class.forName(Class.java:216) 
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
                                                               Caused by: java.lang.ClassNotFoundException: Didn't find class "com.taobao.weex.devtools.debug.DebugServerProxy" on path: DexPathList[[zip file "/data/app/com.ces.mob-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ces.mob-1, /vendor/lib, /system/lib, /data/datalib]]
                                                                  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
                                                                  at java.lang.Class.classForName(Native Method) 
                                                                  at java.lang.Class.forName(Class.java:251) 
                                                                  at java.lang.Class.forName(Class.java:216) 
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 

pp1232 commented Sep 12, 2016

@sospartan

09-12 14:14:13.010 21413-21413/com.ces.mob E/weex: launchInspector HackAssertionException com.taobao.weex.utils.WXHack$HackDeclaration$HackAssertionException: java.lang.ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:232)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337)
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223)
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212)
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24)
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369)
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009)
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613)
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139)
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                  at android.os.Looper.loop(Looper.java:136)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314)
                                                                  at java.lang.reflect.Method.invokeNative(Native Method)
                                                                  at java.lang.reflect.Method.invoke(Method.java:515)
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
                                                                  at dalvik.system.NativeStart.main(Native Method)
                                                               Caused by: java.lang.ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy
                                                                  at java.lang.Class.classForName(Native Method)
                                                                  at java.lang.Class.forName(Class.java:251)
                                                                  at java.lang.Class.forName(Class.java:216)
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
                                                               Caused by: java.lang.NoClassDefFoundError: com/taobao/weex/devtools/debug/DebugServerProxy
                                                                  at java.lang.Class.classForName(Native Method) 
                                                                  at java.lang.Class.forName(Class.java:251) 
                                                                  at java.lang.Class.forName(Class.java:216) 
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
                                                               Caused by: java.lang.ClassNotFoundException: Didn't find class "com.taobao.weex.devtools.debug.DebugServerProxy" on path: DexPathList[[zip file "/data/app/com.ces.mob-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ces.mob-1, /vendor/lib, /system/lib, /data/datalib]]
                                                                  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
                                                                  at java.lang.Class.classForName(Native Method) 
                                                                  at java.lang.Class.forName(Class.java:251) 
                                                                  at java.lang.Class.forName(Class.java:216) 
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
@pp1232

This comment has been minimized.

Show comment
Hide comment
@pp1232

pp1232 Sep 12, 2016

09-12 14:14:13.175 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.175 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.175 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.175 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.180 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.185 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.190 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.205 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.220 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.app.assist.AssistContent', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.220 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.220 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.330 21413-21413/com.ces.mob E/WXTBUtil: isSupportSmartBar:false
09-12 14:15:33.980 22695-22695/com.ces.mob E/weex: launchInspector HackAssertionException com.taobao.weex.utils.WXHack$HackDeclaration$HackAssertionException: java.lang.ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:232)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337)
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223)
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212)
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24)
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369)
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009)
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613)
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139)
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                  at android.os.Looper.loop(Looper.java:136)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314)
                                                                  at java.lang.reflect.Method.invokeNative(Native Method)
                                                                  at java.lang.reflect.Method.invoke(Method.java:515)
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
                                                                  at dalvik.system.NativeStart.main(Native Method)
                                                               Caused by: java.lang.ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy
                                                                  at java.lang.Class.classForName(Native Method)
                                                                  at java.lang.Class.forName(Class.java:251)
                                                                  at java.lang.Class.forName(Class.java:216)
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
                                                               Caused by: java.lang.NoClassDefFoundError: com/taobao/weex/devtools/debug/DebugServerProxy
                                                                  at java.lang.Class.classForName(Native Method) 
                                                                  at java.lang.Class.forName(Class.java:251) 
                                                                  at java.lang.Class.forName(Class.java:216) 
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
                                                               Caused by: java.lang.ClassNotFoundException: Didn't find class "com.taobao.weex.devtools.debug.DebugServerProxy" on path: DexPathList[[zip file "/data/app/com.ces.mob-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.ces.mob-2, /vendor/lib, /system/lib, /data/datalib]]
                                                                  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
                                                                  at java.lang.Class.classForName(Native Method) 
                                                                  at java.lang.Class.forName(Class.java:251) 
                                                                  at java.lang.Class.forName(Class.java:216) 
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
09-12 14:15:34.135 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.140 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.140 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.140 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.145 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.150 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.150 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.155 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.165 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.app.assist.AssistContent', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.165 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.165 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.235 22695-22695/com.ces.mob E/WXTBUtil: isSupportSmartBar:false
09-12 14:15:34.640 22695-22722/com.ces.mob E/jsengine:  ReportException :undefined:379: TypeError: Object [object Object] has no method 'getItem'
09-12 14:15:34.655 22695-22722/com.ces.mob E/jsengine:  ReportException : TypeError: Object [object Object] has no method 'getItem'
                                                                      at Vm.__weex_module__.exports.methods.checkLoginStatus (eval at <anonymous> ((weex):2997:17), <anonymous>:379:15)
                                                                      at Vm.__weex_module__.exports.ready (eval at <anonymous> ((weex):2997:17), <anonymous>:342:10)
                                                                      at (weex):6680:18
                                                                      at Array.forEach (native)
                                                                      at (weex):6679:20
                                                                      at Vm.$emit ((weex):6682:8)
                                                                      at build ((weex):5506:7)
                                                                      at new Vm ((weex):4550:24)
                                                                      at compileCustomComponent ((weex):5733:16)
                                                                      at compile ((weex):5556:6)
09-12 14:15:34.655 22695-22722/com.ces.mob E/weex: reportJSException >>>> instanceId:1, exception function:createInstance, exception:TypeError: Object [object Object] has no method 'getItem'

pp1232 commented Sep 12, 2016

09-12 14:14:13.175 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.175 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.175 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.175 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.180 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.185 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.190 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.205 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.220 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.app.assist.AssistContent', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.220 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.220 21413-21413/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:14:13.330 21413-21413/com.ces.mob E/WXTBUtil: isSupportSmartBar:false
09-12 14:15:33.980 22695-22695/com.ces.mob E/weex: launchInspector HackAssertionException com.taobao.weex.utils.WXHack$HackDeclaration$HackAssertionException: java.lang.ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:232)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337)
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223)
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212)
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24)
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369)
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009)
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613)
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139)
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                  at android.os.Looper.loop(Looper.java:136)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314)
                                                                  at java.lang.reflect.Method.invokeNative(Native Method)
                                                                  at java.lang.reflect.Method.invoke(Method.java:515)
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
                                                                  at dalvik.system.NativeStart.main(Native Method)
                                                               Caused by: java.lang.ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy
                                                                  at java.lang.Class.classForName(Native Method)
                                                                  at java.lang.Class.forName(Class.java:251)
                                                                  at java.lang.Class.forName(Class.java:216)
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230)
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
                                                               Caused by: java.lang.NoClassDefFoundError: com/taobao/weex/devtools/debug/DebugServerProxy
                                                                  at java.lang.Class.classForName(Native Method) 
                                                                  at java.lang.Class.forName(Class.java:251) 
                                                                  at java.lang.Class.forName(Class.java:216) 
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
                                                               Caused by: java.lang.ClassNotFoundException: Didn't find class "com.taobao.weex.devtools.debug.DebugServerProxy" on path: DexPathList[[zip file "/data/app/com.ces.mob-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.ces.mob-2, /vendor/lib, /system/lib, /data/datalib]]
                                                                  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
                                                                  at java.lang.Class.classForName(Native Method) 
                                                                  at java.lang.Class.forName(Class.java:251) 
                                                                  at java.lang.Class.forName(Class.java:216) 
                                                                  at com.taobao.weex.utils.WXHack.into(WXHack.java:230) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.launchInspector(WXBridgeManager.java:350) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.<init>(WXBridgeManager.java:325) 
                                                                  at com.taobao.weex.bridge.WXBridgeManager.getInstance(WXBridgeManager.java:337) 
                                                                  at com.taobao.weex.WXSDKEngine.doInitInternal(WXSDKEngine.java:223) 
                                                                  at com.taobao.weex.WXSDKEngine.initialize(WXSDKEngine.java:212) 
                                                                  at com.ces.mob.bootstrap.AbstractApplication.onCreate(AbstractApplication.java:24) 
                                                                  at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613) 
                                                                  at android.app.ActivityThread.access$1800(ActivityThread.java:139) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:136) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5314) 
                                                                  at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) 
                                                                  at dalvik.system.NativeStart.main(Native Method) 
09-12 14:15:34.135 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.140 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.140 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.140 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.145 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.150 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.150 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.155 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.165 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.app.assist.AssistContent', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.165 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.165 22695-22695/com.ces.mob E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ces.mob.MainActivity.access$super
09-12 14:15:34.235 22695-22695/com.ces.mob E/WXTBUtil: isSupportSmartBar:false
09-12 14:15:34.640 22695-22722/com.ces.mob E/jsengine:  ReportException :undefined:379: TypeError: Object [object Object] has no method 'getItem'
09-12 14:15:34.655 22695-22722/com.ces.mob E/jsengine:  ReportException : TypeError: Object [object Object] has no method 'getItem'
                                                                      at Vm.__weex_module__.exports.methods.checkLoginStatus (eval at <anonymous> ((weex):2997:17), <anonymous>:379:15)
                                                                      at Vm.__weex_module__.exports.ready (eval at <anonymous> ((weex):2997:17), <anonymous>:342:10)
                                                                      at (weex):6680:18
                                                                      at Array.forEach (native)
                                                                      at (weex):6679:20
                                                                      at Vm.$emit ((weex):6682:8)
                                                                      at build ((weex):5506:7)
                                                                      at new Vm ((weex):4550:24)
                                                                      at compileCustomComponent ((weex):5733:16)
                                                                      at compile ((weex):5556:6)
09-12 14:15:34.655 22695-22722/com.ces.mob E/weex: reportJSException >>>> instanceId:1, exception function:createInstance, exception:TypeError: Object [object Object] has no method 'getItem'

@pp1232

This comment has been minimized.

Show comment
Hide comment
@pp1232

pp1232 Sep 12, 2016

@sospartan 公司无法传文件到外网,分两段将日志发出来了,麻烦看看 帮忙分析下

pp1232 commented Sep 12, 2016

@sospartan 公司无法传文件到外网,分两段将日志发出来了,麻烦看看 帮忙分析下

@sospartan

This comment has been minimized.

Show comment
Hide comment
@sospartan

sospartan Sep 12, 2016

@pp1232 这个异常对初始化不会有影响的,已经进行了捕捉. 还是建议你给我一下完整的日志,你贴的这些只有error的,如果不能发文件,可以用 https://gist.github.com/ 来贴 😄

@pp1232 这个异常对初始化不会有影响的,已经进行了捕捉. 还是建议你给我一下完整的日志,你贴的这些只有error的,如果不能发文件,可以用 https://gist.github.com/ 来贴 😄

@StanNing

This comment has been minimized.

Show comment
Hide comment
@StanNing

StanNing Sep 12, 2016

我看到很多人都碰到了同样类似的问题,我这边也会出现这个问题。
情况是这样得:我自己定义了一个Module,然后在application的onCreate里面注册,但是应用第一次启动的时候就不响应,会报has no method的错误。然后退出app在启动一次就可以正常运行了。很奇怪,感觉第一次注册不成功。
我贴下部分代码,
原生代码:

public class WXApplication extends Application {

    private static WXApplication instance = null;

    public static WXApplication getInstance() {
        return instance;
    }

    public WXApplication() { //step 1
        instance = this;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        InitConfig config = new InitConfig.Builder().setImgAdapter(new ImageAdapter()).build();
        WXSDKEngine.initialize(this, config);

        //通用自定义模块定义
        try {
            WXSDKEngine.registerModule("wx-com-module", WxComModule.class);
        } catch (WXException e) {
            e.printStackTrace();
        }
    }
}

public class WxComModule extends WXModule {


    @WXModuleAnno
    public void startUI(String action, String cb) {
        Log.d("weexTest", "========" + action);
        boolean error = false;
        try {
            Intent intent = new Intent();
            intent.setAction(action);
            mWXSDKInstance.getContext().startActivity(intent);
        } catch (ActivityNotFoundException e) {
            error = true;
        }
//        Map<String, Object> result = new HashMap<>(1);
//        result.put("error", error);
//        WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), cb, result);
    }

}

然后是JS的代码:

methods: {
            goWeexSite: function () {
                // this.$openURL('http://alibaba.github.io/weex/')
                weexModule.startUI('TestUI','alibaba');
            }
        }

这样第一次启动之后报错:

09-12 17:30:45.593 24332-24357/com.focuschina.weexdemo E/jsengine:  ReportException :undefined:101: TypeError: Object #<Object> has no method 'startUI'
09-12 17:30:45.603 24332-24357/com.focuschina.weexdemo E/jsengine:  ReportException : TypeError: Object #<Object> has no method 'startUI'
                                                                       at Vm.__weex_module__.exports.methods.goWeexSite (eval at init ((weex):3:28620), <anonymous>:101:17)
                                                                       at Vm.goWeexSite ((weex):1:25467)
                                                                       at Node.<anonymous> ((weex):1:25467)
                                                                       at EventManager.fire ((weex):4:4364)
                                                                       at AppInstance.fireEvent ((weex):3:29551)
                                                                       at fireEvent ((weex):1:18883)
                                                                       at (weex):1:19415
                                                                       at Array.forEach (native)
                                                                       at Object.callJS ((weex):1:19228)
                                                                       at _loop.global.(anonymous function) ((weex):1:1391)
09-12 17:30:45.603 24332-24357/com.focuschina.weexdemo E/weex: reportJSException >>>> instanceId:1, exception function:callJS, exception:TypeError: Object #<Object> has no method 'startUI'

退出应用再次启动又正常了,我看很多人都碰到这个问题,麻烦帮忙查看下原因。

我看到很多人都碰到了同样类似的问题,我这边也会出现这个问题。
情况是这样得:我自己定义了一个Module,然后在application的onCreate里面注册,但是应用第一次启动的时候就不响应,会报has no method的错误。然后退出app在启动一次就可以正常运行了。很奇怪,感觉第一次注册不成功。
我贴下部分代码,
原生代码:

public class WXApplication extends Application {

    private static WXApplication instance = null;

    public static WXApplication getInstance() {
        return instance;
    }

    public WXApplication() { //step 1
        instance = this;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        InitConfig config = new InitConfig.Builder().setImgAdapter(new ImageAdapter()).build();
        WXSDKEngine.initialize(this, config);

        //通用自定义模块定义
        try {
            WXSDKEngine.registerModule("wx-com-module", WxComModule.class);
        } catch (WXException e) {
            e.printStackTrace();
        }
    }
}

public class WxComModule extends WXModule {


    @WXModuleAnno
    public void startUI(String action, String cb) {
        Log.d("weexTest", "========" + action);
        boolean error = false;
        try {
            Intent intent = new Intent();
            intent.setAction(action);
            mWXSDKInstance.getContext().startActivity(intent);
        } catch (ActivityNotFoundException e) {
            error = true;
        }
//        Map<String, Object> result = new HashMap<>(1);
//        result.put("error", error);
//        WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), cb, result);
    }

}

然后是JS的代码:

methods: {
            goWeexSite: function () {
                // this.$openURL('http://alibaba.github.io/weex/')
                weexModule.startUI('TestUI','alibaba');
            }
        }

这样第一次启动之后报错:

09-12 17:30:45.593 24332-24357/com.focuschina.weexdemo E/jsengine:  ReportException :undefined:101: TypeError: Object #<Object> has no method 'startUI'
09-12 17:30:45.603 24332-24357/com.focuschina.weexdemo E/jsengine:  ReportException : TypeError: Object #<Object> has no method 'startUI'
                                                                       at Vm.__weex_module__.exports.methods.goWeexSite (eval at init ((weex):3:28620), <anonymous>:101:17)
                                                                       at Vm.goWeexSite ((weex):1:25467)
                                                                       at Node.<anonymous> ((weex):1:25467)
                                                                       at EventManager.fire ((weex):4:4364)
                                                                       at AppInstance.fireEvent ((weex):3:29551)
                                                                       at fireEvent ((weex):1:18883)
                                                                       at (weex):1:19415
                                                                       at Array.forEach (native)
                                                                       at Object.callJS ((weex):1:19228)
                                                                       at _loop.global.(anonymous function) ((weex):1:1391)
09-12 17:30:45.603 24332-24357/com.focuschina.weexdemo E/weex: reportJSException >>>> instanceId:1, exception function:callJS, exception:TypeError: Object #<Object> has no method 'startUI'

退出应用再次启动又正常了,我看很多人都碰到这个问题,麻烦帮忙查看下原因。

@StanNing

This comment has been minimized.

Show comment
Hide comment
@StanNing

StanNing Sep 12, 2016

少了一段,我的引用方式就是按照例子里面的:
var weexModule = require('@weex-module/wx-com-module');
应该不会是代码引用错误吧,不然不会退出应用再启动就OK了。。。

少了一段,我的引用方式就是按照例子里面的:
var weexModule = require('@weex-module/wx-com-module');
应该不会是代码引用错误吧,不然不会退出应用再启动就OK了。。。

@sospartan

This comment has been minimized.

Show comment
Hide comment
@sospartan

sospartan Sep 12, 2016

@StanNing require这句是放在什么位置的?

@StanNing require这句是放在什么位置的?

@StanNing

This comment has been minimized.

Show comment
Hide comment
@StanNing

StanNing Sep 12, 2016

我贴一下 js 的完整部分

<script>
    var weexModule = require('@weex-module/wx-com-module');
    module.exports = {
        data: {
            intervalValue:"1000",
            isShowIndicators:"true",
            isAutoPlay:"true",
            itemList: [
            {title: 'Java', pictureUrl: 'http://t.cn/RGE3uo9'},
            {title: 'Objective C', pictureUrl: 'http://t.cn/RGE31hq'},
            {title: 'JavaScript', pictureUrl: 'http://t.cn/RGE3AJt'}
            ],
            appearMin:1,
            appearMax:1,
            appearIds:[],
            rows:[
            {id: 1},
            {id: 2},
            {id: 3},
            {id: 4},
            {id: 5},
            {id: 6},
            {id: 7},
            {id: 8},
            {id: 9},
            {id: 10},
            {id: 11},
            {id: 12},
            {id: 13},
            {id: 14},
            {id: 15},
            {id: 16},
            {id: 17},
            {id: 18},
            {id: 19},
            {id: 20},
            {id: 21},
            {id: 22},
            {id: 23},
            {id: 24},
            {id: 25},
            {id: 26},
            {id: 27},
            {id: 28},
            {id: 29}
            ]
        },
        methods: {
            goWeexSite: function () {
                // this.$openURL('http://alibaba.github.io/weex/')
                weexModule.startUI('TestUI','alibaba');
            },
            getTitleTxt : function (){
                return "First Demo2!";
            },
            onappear: function (e) {
                var appearId = this.rows[e.target.attr.index].id;
                nativeLog('+++++', appearId);
                var appearIds = this.appearIds;
                appearIds.push(appearId);
                this.getMinAndMaxIds(appearIds);
            },
            ondisappear:function (e) {
                var disAppearId = this.rows[e.target.attr.index].id;
                nativeLog('+++++', disAppearId);
                var appearIds = this.appearIds;
                var index = appearIds.indexOf(disAppearId);
                if (index > -1) {
                    appearIds.splice(index, 1);
                }
                this.getMinAndMaxIds(appearIds);
            },
            getMinAndMaxIds:function (appearIds) {
                appearIds.sort(function(a, b) {
                    return a - b;
                });
                this.appearIds = appearIds;
                this.appearMax = appearIds[appearIds.length - 1];
                this.appearMin = appearIds[0];
            }
        }
    }
</script>

我贴一下 js 的完整部分

<script>
    var weexModule = require('@weex-module/wx-com-module');
    module.exports = {
        data: {
            intervalValue:"1000",
            isShowIndicators:"true",
            isAutoPlay:"true",
            itemList: [
            {title: 'Java', pictureUrl: 'http://t.cn/RGE3uo9'},
            {title: 'Objective C', pictureUrl: 'http://t.cn/RGE31hq'},
            {title: 'JavaScript', pictureUrl: 'http://t.cn/RGE3AJt'}
            ],
            appearMin:1,
            appearMax:1,
            appearIds:[],
            rows:[
            {id: 1},
            {id: 2},
            {id: 3},
            {id: 4},
            {id: 5},
            {id: 6},
            {id: 7},
            {id: 8},
            {id: 9},
            {id: 10},
            {id: 11},
            {id: 12},
            {id: 13},
            {id: 14},
            {id: 15},
            {id: 16},
            {id: 17},
            {id: 18},
            {id: 19},
            {id: 20},
            {id: 21},
            {id: 22},
            {id: 23},
            {id: 24},
            {id: 25},
            {id: 26},
            {id: 27},
            {id: 28},
            {id: 29}
            ]
        },
        methods: {
            goWeexSite: function () {
                // this.$openURL('http://alibaba.github.io/weex/')
                weexModule.startUI('TestUI','alibaba');
            },
            getTitleTxt : function (){
                return "First Demo2!";
            },
            onappear: function (e) {
                var appearId = this.rows[e.target.attr.index].id;
                nativeLog('+++++', appearId);
                var appearIds = this.appearIds;
                appearIds.push(appearId);
                this.getMinAndMaxIds(appearIds);
            },
            ondisappear:function (e) {
                var disAppearId = this.rows[e.target.attr.index].id;
                nativeLog('+++++', disAppearId);
                var appearIds = this.appearIds;
                var index = appearIds.indexOf(disAppearId);
                if (index > -1) {
                    appearIds.splice(index, 1);
                }
                this.getMinAndMaxIds(appearIds);
            },
            getMinAndMaxIds:function (appearIds) {
                appearIds.sort(function(a, b) {
                    return a - b;
                });
                this.appearIds = appearIds;
                this.appearMax = appearIds[appearIds.length - 1];
                this.appearMin = appearIds[0];
            }
        }
    }
</script>
@sospartan

This comment has been minimized.

Show comment
Hide comment
@sospartan

sospartan Sep 12, 2016

@StanNing 能帮我验证一下么,如果把require放到使用的那个function里会不会出现这个情况

@StanNing 能帮我验证一下么,如果把require放到使用的那个function里会不会出现这个情况

@StanNing

This comment has been minimized.

Show comment
Hide comment
@StanNing

StanNing Sep 12, 2016

我刚验证了,确实可以了。放到对应的func里面去require就不会出现第一次启动注册失败的情况了。请问这个需要修复吗?什么原因啊? 之后是不是所有地方都需要放到对应func里面去require啊?

我刚验证了,确实可以了。放到对应的func里面去require就不会出现第一次启动注册失败的情况了。请问这个需要修复吗?什么原因啊? 之后是不是所有地方都需要放到对应func里面去require啊?

@sospartan

This comment has been minimized.

Show comment
Hide comment
@sospartan

sospartan Sep 12, 2016

@StanNing @pp1232 @qbcbyb 我了解到有个已知的issue,require的语句如果是放到单独的js文件,就会出现这个错误 #1206 你们的情况符合不符合

@StanNing @pp1232 @qbcbyb 我了解到有个已知的issue,require的语句如果是放到单独的js文件,就会出现这个错误 #1206 你们的情况符合不符合

@StanNing

This comment has been minimized.

Show comment
Hide comment
@StanNing

StanNing Sep 12, 2016

额。。。不是啊,我不是一个单独的模块啊。。。
我给你看下我的对应的整个.we文件。并不是单独引用的。。。

<template>
    <div>
        <text class="title">{{getTitleTxt()}}</text>

        <slider class="slider" interval="{{intervalValue}}" auto-play="{{isAutoPlay}}" >
            <div class="slider-pages" repeat="{{itemList}}" onclick="goWeexSite" >
                <image class="thumb" src="{{pictureUrl}}"></image>
                <text class="title">{{title}}</text>
            </div>
        </slider>

        <list class="list">
            <cell onappear="onappear" ondisappear="ondisappear" class="row" repeat="{{rows}}" index="{{$index}}">
                <div class="item">
                    <text class="item-title">row {{id}}</text>
                </div>
            </cell>
        </list>
        <text class="count" value="Appear items:{{appearMin}} - {{appearMax}}"></text>
    </div>

</template>

<style>
    .list {
        height:750;
    }
    .count {
        font-size: 48;
        margin:10;
    }
    .indicator {
        height: 40;
        width: 40;
        color:#45b5f0;
    }
    .row {
        width: 750;
    }
    .item {
        justify-content: center;
        border-bottom-width: 2;
        border-bottom-color: #c0c0c0;
        height: 100;
        padding:20;
    }
    .item-title {
    }
    .cell { margin-top:10 ; margin-left:10 ; flex-direction: row; }
    .thumb { width: 100; height: 100; }
    .title { text-align: center; color: red; font-size: 50; margin: 10;}
    .slider {
        margin: 10;
        width: 714;
        height: 100;
    }
    .slider-pages {
        flex-direction: row;
        width: 714;
        height: 100;
    }
</style>

<script>
    module.exports = {
        data: {
            intervalValue:"1000",
            isShowIndicators:"true",
            isAutoPlay:"true",
            itemList: [
            {title: 'Java', pictureUrl: 'http://t.cn/RGE3uo9'},
            {title: 'Objective C', pictureUrl: 'http://t.cn/RGE31hq'},
            {title: 'JavaScript', pictureUrl: 'http://t.cn/RGE3AJt'}
            ],
            appearMin:1,
            appearMax:1,
            appearIds:[],
            rows:[
            {id: 1},
            {id: 2},
            {id: 3},
            {id: 4},
            {id: 5},
            {id: 6},
            {id: 7},
            {id: 8},
            {id: 9},
            {id: 10},
            {id: 11},
            {id: 12},
            {id: 13},
            {id: 14},
            {id: 15},
            {id: 16},
            {id: 17},
            {id: 18},
            {id: 19},
            {id: 20},
            {id: 21},
            {id: 22},
            {id: 23},
            {id: 24},
            {id: 25},
            {id: 26},
            {id: 27},
            {id: 28},
            {id: 29}
            ]
        },
        methods: {
            goWeexSite: function () {
                // this.$openURL('http://alibaba.github.io/weex/')
                var weexModule = require('@weex-module/wx-com-module');
                weexModule.startUI('TestUI','alibaba');
            },
            getTitleTxt : function (){
                return "First Demo2!";
            },
            onappear: function (e) {
                var appearId = this.rows[e.target.attr.index].id;
                nativeLog('+++++', appearId);
                var appearIds = this.appearIds;
                appearIds.push(appearId);
                this.getMinAndMaxIds(appearIds);
            },
            ondisappear:function (e) {
                var disAppearId = this.rows[e.target.attr.index].id;
                nativeLog('+++++', disAppearId);
                var appearIds = this.appearIds;
                var index = appearIds.indexOf(disAppearId);
                if (index > -1) {
                    appearIds.splice(index, 1);
                }
                this.getMinAndMaxIds(appearIds);
            },
            getMinAndMaxIds:function (appearIds) {
                appearIds.sort(function(a, b) {
                    return a - b;
                });
                this.appearIds = appearIds;
                this.appearMax = appearIds[appearIds.length - 1];
                this.appearMin = appearIds[0];
            }
        }
    }
</script>

我是一个完整的.we格式的文件。。。

额。。。不是啊,我不是一个单独的模块啊。。。
我给你看下我的对应的整个.we文件。并不是单独引用的。。。

<template>
    <div>
        <text class="title">{{getTitleTxt()}}</text>

        <slider class="slider" interval="{{intervalValue}}" auto-play="{{isAutoPlay}}" >
            <div class="slider-pages" repeat="{{itemList}}" onclick="goWeexSite" >
                <image class="thumb" src="{{pictureUrl}}"></image>
                <text class="title">{{title}}</text>
            </div>
        </slider>

        <list class="list">
            <cell onappear="onappear" ondisappear="ondisappear" class="row" repeat="{{rows}}" index="{{$index}}">
                <div class="item">
                    <text class="item-title">row {{id}}</text>
                </div>
            </cell>
        </list>
        <text class="count" value="Appear items:{{appearMin}} - {{appearMax}}"></text>
    </div>

</template>

<style>
    .list {
        height:750;
    }
    .count {
        font-size: 48;
        margin:10;
    }
    .indicator {
        height: 40;
        width: 40;
        color:#45b5f0;
    }
    .row {
        width: 750;
    }
    .item {
        justify-content: center;
        border-bottom-width: 2;
        border-bottom-color: #c0c0c0;
        height: 100;
        padding:20;
    }
    .item-title {
    }
    .cell { margin-top:10 ; margin-left:10 ; flex-direction: row; }
    .thumb { width: 100; height: 100; }
    .title { text-align: center; color: red; font-size: 50; margin: 10;}
    .slider {
        margin: 10;
        width: 714;
        height: 100;
    }
    .slider-pages {
        flex-direction: row;
        width: 714;
        height: 100;
    }
</style>

<script>
    module.exports = {
        data: {
            intervalValue:"1000",
            isShowIndicators:"true",
            isAutoPlay:"true",
            itemList: [
            {title: 'Java', pictureUrl: 'http://t.cn/RGE3uo9'},
            {title: 'Objective C', pictureUrl: 'http://t.cn/RGE31hq'},
            {title: 'JavaScript', pictureUrl: 'http://t.cn/RGE3AJt'}
            ],
            appearMin:1,
            appearMax:1,
            appearIds:[],
            rows:[
            {id: 1},
            {id: 2},
            {id: 3},
            {id: 4},
            {id: 5},
            {id: 6},
            {id: 7},
            {id: 8},
            {id: 9},
            {id: 10},
            {id: 11},
            {id: 12},
            {id: 13},
            {id: 14},
            {id: 15},
            {id: 16},
            {id: 17},
            {id: 18},
            {id: 19},
            {id: 20},
            {id: 21},
            {id: 22},
            {id: 23},
            {id: 24},
            {id: 25},
            {id: 26},
            {id: 27},
            {id: 28},
            {id: 29}
            ]
        },
        methods: {
            goWeexSite: function () {
                // this.$openURL('http://alibaba.github.io/weex/')
                var weexModule = require('@weex-module/wx-com-module');
                weexModule.startUI('TestUI','alibaba');
            },
            getTitleTxt : function (){
                return "First Demo2!";
            },
            onappear: function (e) {
                var appearId = this.rows[e.target.attr.index].id;
                nativeLog('+++++', appearId);
                var appearIds = this.appearIds;
                appearIds.push(appearId);
                this.getMinAndMaxIds(appearIds);
            },
            ondisappear:function (e) {
                var disAppearId = this.rows[e.target.attr.index].id;
                nativeLog('+++++', disAppearId);
                var appearIds = this.appearIds;
                var index = appearIds.indexOf(disAppearId);
                if (index > -1) {
                    appearIds.splice(index, 1);
                }
                this.getMinAndMaxIds(appearIds);
            },
            getMinAndMaxIds:function (appearIds) {
                appearIds.sort(function(a, b) {
                    return a - b;
                });
                this.appearIds = appearIds;
                this.appearMax = appearIds[appearIds.length - 1];
                this.appearMin = appearIds[0];
            }
        }
    }
</script>

我是一个完整的.we格式的文件。。。

@StanNing

This comment has been minimized.

Show comment
Hide comment
@StanNing

StanNing Sep 12, 2016

上面这个是不出错的代码,但是如果把require放到func外面script下面引用,就会出现第一次注册不成功的情况。

StanNing commented Sep 12, 2016

上面这个是不出错的代码,但是如果把require放到func外面script下面引用,就会出现第一次注册不成功的情况。

@pp1232

This comment has been minimized.

Show comment
Hide comment
@pp1232

pp1232 Sep 12, 2016

@sospartan @StanNing 我感觉这个是bug,有些模块可能在整个页面中很多函数都会用到,如果放到每个函数中都去require的话是不合理的。

pp1232 commented Sep 12, 2016

@sospartan @StanNing 我感觉这个是bug,有些模块可能在整个页面中很多函数都会用到,如果放到每个函数中都去require的话是不合理的。

@pp1232

This comment has been minimized.

Show comment
Hide comment
@pp1232

pp1232 Sep 13, 2016

@sospartan 日志终于传上来了,为了上传这个日志,在公司走了两天流程
native.txt

pp1232 commented Sep 13, 2016

@sospartan 日志终于传上来了,为了上传这个日志,在公司走了两天流程
native.txt

@zjutkz

This comment has been minimized.

Show comment
Hide comment
@zjutkz

zjutkz Sep 21, 2016

@YorkShen
之前和你邮件沟通的那个问题还是没有解决。
对应Android SDK版本0.7.0
下面是我的.we文件的js部分:

<script>
  module.exports = {
    data: {
      shown: false,
      list: []
    },
    created: function(){
      this.getData();
    },
    ready: {},
    computed: {},
    methods: {
      onItemClick: function(e){
        this.$call('modal', 'toast', {
          'message': 'row ' + e.target.attr.index + ' clicked',
          'duration': 2.0
        });
      },
      getData: function(){
        var self = this;
        var stream = require('@weex-module/stream');
        stream.fetch({
            method: 'POST',
            url: "xxxxxxxxxxxxx",
            headers: {"content-type":"application/json"},
            type:'json',
            body: {"pageNum":1,"pageSize":10,"type":1}
        }, function(response) {
            //process response
            self.list = [];
            self.list = response.data.result.list;
            self.shown = true;
            /*var modal = require('@weex-module/modal');
            modal.toast({'message': response.data.result.count, 'duration': 1});*/
        },function(response){
            //progress response
        });
      },
    }
  }
</script>

在app第一次冷启动的时候报出fetch方法找不到:
ReportException :undefined:286: TypeError: Object [object Object] has no method 'fetch'
之后热启动就可以了。

zjutkz commented Sep 21, 2016

@YorkShen
之前和你邮件沟通的那个问题还是没有解决。
对应Android SDK版本0.7.0
下面是我的.we文件的js部分:

<script>
  module.exports = {
    data: {
      shown: false,
      list: []
    },
    created: function(){
      this.getData();
    },
    ready: {},
    computed: {},
    methods: {
      onItemClick: function(e){
        this.$call('modal', 'toast', {
          'message': 'row ' + e.target.attr.index + ' clicked',
          'duration': 2.0
        });
      },
      getData: function(){
        var self = this;
        var stream = require('@weex-module/stream');
        stream.fetch({
            method: 'POST',
            url: "xxxxxxxxxxxxx",
            headers: {"content-type":"application/json"},
            type:'json',
            body: {"pageNum":1,"pageSize":10,"type":1}
        }, function(response) {
            //process response
            self.list = [];
            self.list = response.data.result.list;
            self.shown = true;
            /*var modal = require('@weex-module/modal');
            modal.toast({'message': response.data.result.count, 'duration': 1});*/
        },function(response){
            //progress response
        });
      },
    }
  }
</script>

在app第一次冷启动的时候报出fetch方法找不到:
ReportException :undefined:286: TypeError: Object [object Object] has no method 'fetch'
之后热启动就可以了。

@YorkShen

This comment has been minimized.

Show comment
Hide comment

@zjutkz Get

@zjutkz

This comment has been minimized.

Show comment
Hide comment
@zjutkz

zjutkz Sep 23, 2016

@YorkShen 这个问题在sdk升级到0.7.0之后不是必现的,不过复现的概率还是挺高的。

zjutkz commented Sep 23, 2016

@YorkShen 这个问题在sdk升级到0.7.0之后不是必现的,不过复现的概率还是挺高的。

@YorkShen YorkShen self-assigned this Sep 29, 2016

YorkShen added a commit to sospartan/weex that referenced this issue Sep 29, 2016

@YorkShen

This comment has been minimized.

Show comment
Hide comment
@YorkShen

YorkShen Sep 29, 2016

问题的原因如@zjutkz 所述,由于使用了在handler中调用了handler,导致了一个handler的任务在事实上被拆分成两个任务,这两个任务之间可能插入第三方任务,这样破坏了任务的原子性,导致了上述bug。即handler先执行registerNativeModule,再执行executeJS,再执行registerJSModule,在执行executeJS时,由于对应的Module信息还没有通知给js,导致了TypeError: Object [object Object] has no method 'fetch'。 Thanks to @zjutkz

问题的原因如@zjutkz 所述,由于使用了在handler中调用了handler,导致了一个handler的任务在事实上被拆分成两个任务,这两个任务之间可能插入第三方任务,这样破坏了任务的原子性,导致了上述bug。即handler先执行registerNativeModule,再执行executeJS,再执行registerJSModule,在执行executeJS时,由于对应的Module信息还没有通知给js,导致了TypeError: Object [object Object] has no method 'fetch'。 Thanks to @zjutkz

@YorkShen YorkShen closed this Sep 29, 2016

@StanNing

This comment has been minimized.

Show comment
Hide comment
@StanNing

StanNing Sep 29, 2016

@YorkShen 这个issue给关闭是已经修复了吗?在什么版本的sdk修复啊?可以给出修复和出错的代码片段吗?

@YorkShen 这个issue给关闭是已经修复了吗?在什么版本的sdk修复啊?可以给出修复和出错的代码片段吗?

@sospartan

This comment has been minimized.

Show comment
Hide comment
@sospartan

sospartan Sep 29, 2016

是在 2b54731 修复的,你可以使用android分支进行验证 @StanNing

是在 2b54731 修复的,你可以使用android分支进行验证 @StanNing

xkli added a commit to sospartan/weex that referenced this issue Oct 9, 2016

Merge branch 'tb-dev' into tb-dev-new-playground
* tb-dev: (80 commits)
  * [android] update js-framework
  * [android] Fix move child from index to index b within the same parent
  * [android] jsfm update to 0.16.12
  * [android] callNative &nativeLog api  support emoji
  * [android] support emoji
  * [android] update WXImageView support gif
  * [android] update WXImageView support gif
  * [android] jsfm update to 0.16.11
  * [android] add fixed size property
  Fix alibaba/weex#1200
  Fix NPE in WXEmbed
  * [android] update getComponentSize size location screen
  * [android] reformat code in WXBorderDrawable
  * [android] change wxattr and wxstyle from concurrentHashMap to HashMap
  * [android] update bottom,top,right,left
  * [android] update unit test
  * [android] update getcomponentsize return Rect
  * [android] update unit test
  * [android] update unit test
  * [android] update unit test
  ...
@androidShuang

This comment has been minimized.

Show comment
Hide comment
@androidShuang

androidShuang Oct 10, 2016

@pp1232你的问题解决没?

@pp1232你的问题解决没?

luics added a commit that referenced this issue Oct 18, 2016

Merge v0.8.0 to master (#1430)
* * [test] jsfm update 0.15.8

* * [html5] fix img lazyload

* * [ios] change variable type.

* * [android] fix log utility

* * [ios] fix css node children count invalid while change from or change to fixed position.

* * [ios] move callAddElement outside so that devtool can work

* * [ios] fix compile error

* - [ios] remove unused import

* * [ios] fix css node children count invalid while change from or change to fixed position.

* * [ios] add uuid for utility

* * [ios] fix warning

* * [android] update the devtools version adapt to the added method in IWXBridge

* * [android] update add callback(....keepalive) method

* * [android]  add GeolocationModule

* * [android]  update WXApplication register geolocation

* * [android] close perf switch

* * [ios] upgrade sdk version to 0.9.1

* * [ios] upgrade sdk version to 0.9.1

* * [android]  update WXpageActivity permission request

* * [android]  update remove judge version to use persimmon

* * [android]  update annotate

* * [ios] fix debug value

* * [ios] playground iOS 10 camera adapter

* * [ios] show refresh when load remote bundle js

* * [android]  update isDestroy

* * [android]  update Defaultlocation

* * [android]  update inspector version

* * [ios] width/height animation should be 750 pixel type.

* [iOS] fix bug , can not auto play and always toast

* [ios] fix bug, iOS 10 crash if not set camera usage description

* * [android]  update DefaultLocation

* * [Android] Cherry-Pick commit f3204b0, 942c77f, 0f0fedb, 5a2ad91
    + animation.style{width, height}
    + timing-function: cubic-bezier(0.1, 0.7, 1.0, 0.1)
    * crash of textWidth

* * [android] add embedmanager

* * [ios] fix issue that transform-origin not works in rotation transform

* * [ios] list only support cell/header/refresh/loading/fixed-component as child.

* * [ios] garbage collect in release mode

* * [android] update wxembed add parse _wx_tpl

* * [android]  update judge np

* Revert "* [android]  update judge np"

This reverts commit c43d8a9.

* Revert "* [android] update wxembed add parse _wx_tpl"

This reverts commit e2a27f9.

* * [android] update get real src from _wx_tpl

* Revert "* [android] update get real src from _wx_tpl"

This reverts commit e9cd7aa.

* * [ios] slider-neighbor scale adjust

* * [Android] Fix image resize is stretch even if the resize of image is cover or contain

* * [android]  update add transform url method

* * [ios] clip bounds for slider-neighbor view

* * [ios] correct slider-neighbor index in event

* * [ios] adjust neighbor space

* * [ios]  stop the Xcode 8 iOS Simulator from logging like crazy

* Update cheatsheet.md

<switch> attr add `disabled `

* * [android] mrege 0.7.1-dev remote

* * [android] fix slider start auto scroll after activity resume.

* * [doc] fix a bug, actually, self-defined class cannot be passed as params properly

* slider neighbor update (#1226)

* slider neighbor update

* bug fix

* bug fix

* remove unused note

* slider neighbor update (#1226)

* slider neighbor update

* bug fix

* bug fix

* remove unused note

* * [ios] revert iOS version to 0.8.0

* * [android]  update rename location

* * [jsfm] v0.16.4

* * [test] jsfm rx

* * [ios] add slider-neighbor view alpha when init

* * [ios] indexDict must be accessed on component thread, fix componentForRef crash

* * [ios] add foundation.h

* * [ios] public WXComponentMananger.h

* * [jsfm] upgrade weex-rx-framework to 0.1.8

* * [jsfm] v0.16.5

* * [ios] roll back jsfm

* * [ios] correct  neighbor-space

* * [jsfm] upgrade weex-rx-framework to 0.1.9

* * [html5] add geolocation module

* * [html5] support timeout and maximumAge

* * [jsfm] v0.16.6

* add Attributes `index`

add Attributes `index`

* * [android] refactor video load lazy load

* * [android] Module NPE Fix

* * [android] fix circle ci

* Update circle ci config 

add JVM config for avoiding exceed memory limit

* slider-neighbor bug fixed.(split problem)

* * [ios] fix issue that fixed-position component's view be reallocated while it is in a cell.

* * [android] disable coverage report in circle ci

* * [android] test ci

* slider-neighbor bug fixed.(split problem)

* * [android] no flush to avoid SIGILL

* Adjust link path.

* * [ios] add description for camera and location privacy

* * [ios] fix #1188, support for converting string to NSUInteger.

* * [ios] jsfm update to 0.15.9

* * [android] bug fix classcast exception

* * [android] add callAddElement debug log

* Revert "* [ios] jsfm update to 0.15.9"

This reverts commit a4dcf33.

* + [jsfm] add static support

* * [android] update fix global event Memory leak

* * [android] update location

* * [ios] fix keyboard cover input sometime

* add test array and test dict methods.

* * [android] clear Instance fields when destory

* signing CLA, add email again for git

* Revert "add test array and test dict methods."

This reverts commit 5ea8f10.

* * [android] update modify javadoc error

* * [android] process prop to avoid reflection

* * [jsfm] fix bug

* * [android]  add none-lazy load component

* * [android] cache MethodInvoker  Parameter

* * [android] filter unused  style set

* * [android] avoid useless setProperty invocation.

* typo Module

* * [android] update style, avoid setProperty invocation for "value"

* * [ios] fix slider example href

* Revert "* [ios] fix keyboard cover input sometime"

This reverts commit 0ad56dc.

* * [jsfm] fix #1237, fix binding event bug of components which have repeat attribute

* * [ios] fix style line-height conflict with text-align

* * [html5] fix class name

* * [jsfm] upgrade weex-rx-framework to 0.1.11

* * [html5] add addRule to dom module for iconfont support.

* * [android] add log filter &perf log

* * [html5] fix lint

* * [android] perf log

* [ios] bugfix - url : 打开url的时候需要先判断一下有没有参数,以决定拼接random参数是用?还是&连接,要不然url会拼错

* * [doc] add devtool link to README

* * [doc] add devtool link to README

* * [html5] test appear in next tick

* * [android] update JSF 0.15.9

* * [jsfm] fix callAddElement callback -1

* * [jsfm] v0.15.9

* * [android] update 0.15.9-release

* * [android] destroyInstance bugfix

* * [android] expose  GC api to js

* * [android] update WXModule.java add some constants

* * [android] update GelocationModule.java Reconstruction

* * [android] update location requestcode

* add features to storage module(android) (#1296)

* storage enhance. add LRU strategy to remove item

* add storage compatible function

* add test

* add note/remove space

* code defense for storage

* add log

* update

* update

* add features to storage module(android) (#1296)

* storage enhance. add LRU strategy to remove item

* add storage compatible function

* add test

* add note/remove space

* code defense for storage

* add log

* update

* update

* add features to storage module(android) (#1296)

* storage enhance. add LRU strategy to remove item

* add storage compatible function

* add test

* add note/remove space

* code defense for storage

* add log

* update

* update

* * [ios] fix review problem

* * [ios] change return type to void

* * [android] fix editComponent set non-string value

* * [android] opt Opacity attribute's FPS performance

* * [jsfm] v0.16.8

* * [jsfm] upgrade weex-rx-framework to 0.1.12

* * [jsfm] v0.16.9

* * [android] set View.LAYER_TYPE_NONE to release GL

* * [android] bug fix native crash

* Correct typos

* * [doc] add latest version badge (#1305)

* * [android] fix #1102

* * [doc] add latest sdk version badge

* modify repo link

* + [jsfm] add Array.from polyfill and tests

* + [jsfm] add Object.setPrototypeOf polyfill and tests

* * [test] set eslint-disable for polyfill tests

* * [test] modify the test suit timeout in reset style

* Fix NPE in WXEmbed

* * [ios] fix update WeexSDK podspec version to 0.7.0

* * [jsfm] v0.16.10

* Fix #1200

* * [jsfm] upgrade weex-rx-framework to 0.1.13

* * [jsfm] v0.16.11

* * [android] jsfm update to 0.16.11

* * [android] update WXImageView support gif

* * [android] support emoji

* * [android] callNative &nativeLog api  support emoji

* * [ios] upgrade podspec version to 0.8.0

* * [jsfm] fix bug for clear common modules (pr #1097)

* * [jsfm] fix the test of clearCommonModules

* + [jsfm] add test suit for define custom modules

* * [jsfm] set specific version for weex-rx-framework

* * [jsfm] v0.16.12

* * [jsfm] supported framework flag in the beginning of a JS bundle but after some spaces

* * [jsfm] v0.16.14

* + [jsfm] add test case for Dep.target bug

* * [jsfm] fix the bug of Dep.target

* * [jsfm] v0.16.15

* * [android] fix #1380, update method getOffsetAmount in WXCircleViewPager.java (#1382)

* * [ios] fix #1192, #FFF display error in iOS

* * [jsfm] removed rx temporarily

* * [jsfm] adapted native version that not support callAddElement

* * [jsfm] v0.16.17

* * [html5] fix conflicts with jsfm 0.16

* * [html5] update subversion

* * [android] enable node test

* *[ios]remove devtool file,modify podfile in playground

* * [ios] fix playground Podfile   remove c header file  include in WXUtility.h

YorkShen added a commit to sospartan/weex that referenced this issue Nov 15, 2016

@AllenVork

This comment has been minimized.

Show comment
Hide comment
@AllenVork

AllenVork Mar 22, 2017

@pp1232 我也遇到了ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy问题,你知道怎么解决吗?

@pp1232 我也遇到了ClassNotFoundException: com.taobao.weex.devtools.debug.DebugServerProxy问题,你知道怎么解决吗?

@AllenVork

This comment has been minimized.

Show comment
Hide comment
@AllenVork

AllenVork Mar 22, 2017

@androidShuang 你找到解决方法了吗

@androidShuang 你找到解决方法了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment