You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2020/01/10 13:52:19 UTC

[GitHub] [incubator-weex] FightingForDevelop opened a new issue #3113: [Android]White Screen onRenderError -1001, degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

FightingForDevelop opened a new issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0
URL: https://github.com/apache/incubator-weex/issues/3113
 
 
   My project occurs white screen now and then.But it reproduces difficultily.And I check source codes finding that it execute in Child Thread.Even if it didn't occur in old version.
    
   `private static void doInitInternal(final Application application, final InitConfig config) {
           WXEnvironment.sApplication = application;
           if (application == null) {
               WXLogUtils.e("WXSDKEngine", " doInitInternal application is null");
               WXExceptionUtils.commitCriticalExceptionRT((String)null, WXErrorCode.WX_KEY_EXCEPTION_SDK_INIT, "doInitInternal", WXErrorCode.WX_KEY_EXCEPTION_SDK_INIT.getErrorMsg() + "WXEnvironment sApplication is null", (Map)null);
           }
   
           WXEnvironment.JsFrameworkInit = false;
           WXBridgeManager.getInstance().postWithName(new Runnable() {
               public void run() {
                   long start = System.currentTimeMillis();
                   WXSDKManager sm = WXSDKManager.getInstance();
                   sm.onSDKEngineInitialize();
                   if (config != null) {
                       sm.setInitConfig(config);
                   }
   
                   WXSoInstallMgrSdk.init(application, sm.getIWXSoLoaderAdapter(), sm.getWXStatisticsListener());
                   IWXUserTrackAdapter userTrackAdapter = config != null ? config.getUtAdapter() : null;
                   int version = true;
                   WXSDKEngine.mIsSoInit = WXSoInstallMgrSdk.initSo("weexcore", 1, userTrackAdapter);
                   WXSoInstallMgrSdk.copyJssRuntimeSo();
                   if (config != null) {
                       Iterator var6 = config.getNativeLibraryList().iterator();
   
                       while(var6.hasNext()) {
                           String libraryName = (String)var6.next();
                           WXSoInstallMgrSdk.initSo(libraryName, 1, userTrackAdapter);
                       }
                   }
   
                   if (!WXSDKEngine.mIsSoInit) {
                       WXExceptionUtils.commitCriticalExceptionRT((String)null, WXErrorCode.WX_KEY_EXCEPTION_SDK_INIT, "doInitInternal", WXErrorCode.WX_KEY_EXCEPTION_SDK_INIT.getErrorMsg() + "isSoInit false", (Map)null);
                   } else {
                       sm.initScriptsFramework(config != null ? config.getFramework() : null);
                       WXEnvironment.sSDKInitExecuteTime = System.currentTimeMillis() - start;
                       WXLogUtils.renderPerformanceLog("SDKInitExecuteTime", WXEnvironment.sSDKInitExecuteTime);
                   }
               }
           }, (WXSDKInstance)null, "doInitWeexSdkInternal");
           WXStateRecord.getInstance().startJSThreadWatchDog();
           register();
       }`
   
   So I annotate "WXSDKEngine.initialize(BaseApplication.app, con);" to simulate error -1001.And in Method"onException" catching the errCode,I reinitialize and reload the page,then it works.I want to affirm if it reasonable or not. Looking forward to your reply!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] FightingForDevelop commented on issue #3113: [Android]White Screen onRenderError -1001, degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
FightingForDevelop commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-581839228
 
 
   > **you can edit your build.gradle in app**
   > such as ndk:
   > 
   > ```
   > ndk {
   >             abiFilters "x86"
   >             abiFilters "arm64-v8a"
   >             abiFilters "armeabi-v7a"
   >  }
   > ```
   I have added it,it isn't the resone.
   ndk {
               abiFilters "armeabi-v7a", "x86"
           }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] tuoxie007 commented on issue #3113: [Android]White Screen onRenderError -1001, degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
tuoxie007 commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-599364688
 
 
   Same problem.
   
   -1001:degradeToH5|createInstance fail|wx_create_instance_error[WXBridgeManager] invokeCreateInstance

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] aidy-automan commented on issue #3113: [Android]White Screen onRenderError -1001, degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-575950762
 
 
   **you can edit your  build.gradle in app**
   such as ndk:
   ndk {
               abiFilters "x86"
               abiFilters "arm64-v8a"
               abiFilters "armeabi-v7a"
    }
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] FightingForDevelop commented on issue #3113: [Android]White Screen onRenderError -1001, degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
FightingForDevelop commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-581860111
 
 
   > @FightingForDevelop You remove [init](https://github.com/apache/incubator-weex/blob/7548ba6214ddfe16455cf03c577941f1dfb1ecdc/android/sdk/src/main/java/org/apache/weex/WXSDKEngine.java#L219), and everything went well?
   > 
   > That's very unlikely.
   
   No,no,I just simulate the error to locate the problem.I find that White Screen onRenderError -1001 because it hasn't finished initialize.So I initialize it again  the page onException by code -1001. How can I know when it's initialized and then load the page?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] YorkShen commented on issue #3113: [Android]White Screen onRenderError -1001, degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
YorkShen commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-581831314
 
 
   @FightingForDevelop You remove [init](https://github.com/apache/incubator-weex/blob/7548ba6214ddfe16455cf03c577941f1dfb1ecdc/android/sdk/src/main/java/org/apache/weex/WXSDKEngine.java#L219), and everything went well?
   
   That's very unlikely.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] aidy-automan edited a comment on issue #3113: [Android]White Screen onRenderError -1001, degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan edited a comment on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-575950762
 
 
   **you can edit your  build.gradle in app**
   such as ndk:
   ```
   ndk {
               abiFilters "x86"
               abiFilters "arm64-v8a"
               abiFilters "armeabi-v7a"
    }
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] FightingForDevelop commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
FightingForDevelop commented on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647871949


   > ni shi chinese?直接用中文
   
   And you?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] aidy-automan commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan commented on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647872385


   你现在还是白屏吗?weex应该都是我们自己人在用吧


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] XBYoung commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
XBYoung commented on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-625080571


   onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1
   ```
    ndk {
               abiFilters "x86"
               abiFilters "arm64-v8a"
               abiFilters "armeabi-v7a"
           }
   ```
   
   ```
     implementation 'com.alibaba:fastjson:1.1.46.android'
       implementation 'org.apache.weex:sdk:0.28.0'
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] aidy-automan edited a comment on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan edited a comment on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647847501


   ni shi chinese?直接用中文


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] aidy-automan edited a comment on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan edited a comment on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647877370


   这样做没问题,我也是在splush页面这样写的
   
   
   
   
   ```
   private void syncSDKInit(final String RenderPageUrl) {
           if (!WXSDKEngine.isInitialized()) {
               mTipView.postDelayed(new Runnable() {
                   @Override
                   public void run() {
                       syncSDKInit(RenderPageUrl);
                   }
               }, 100);
           } else {
               jumpPage(RenderPageUrl);
           }
       }
   ```
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] FightingForDevelop commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
FightingForDevelop commented on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647877082


   
   ` @Override
       public void onCreate(@Nullable Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           if (mWXSDKInstance != null) {
               mWXSDKInstance.onActivityCreate();
           }
       }
   
   public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   loadJsBundle();
   }
   public void loadJsBundle() {
   activityContext = getActivityContext();
               showLoading();
               if (mWXSDKInstance != null) {
                   mWXSDKInstance.registerRenderListener(null);
                   mWXSDKInstance.destroy();
                   mWXSDKInstance = null;
               }
               mWXSDKInstance = new WXSDKInstance(activityContext);
               mWXSDKInstance.registerRenderListener(this);
   }`
   现在是这样处理的,我在IWXRenderListener的onException检测到异常会再次调用loadJsBundle()知道页面展示出来


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] aidy-automan commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan commented on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647847501


   ni shi chinese?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] aidy-automan commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan commented on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647877370


   这样做没问题,我也是在splush页面这样写的


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] aidy-automan edited a comment on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan edited a comment on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647877370


   我是在activity页面这样写的
   
   ```
   private void syncSDKInit(final String RenderPageUrl) {
           if (!WXSDKEngine.isInitialized()) {
               mTipView.postDelayed(new Runnable() {
                   @Override
                   public void run() {
                       syncSDKInit(RenderPageUrl);
                   }
               }, 100);
           } else {
               jumpPage(RenderPageUrl);
           }
       }
   ```
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] FightingForDevelop commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
FightingForDevelop commented on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647888014


   > 我是在activity页面这样写的
   > 
   > ```
   > private void syncSDKInit(final String RenderPageUrl) {
   >         if (!WXSDKEngine.isInitialized()) {
   >             mTipView.postDelayed(new Runnable() {
   >                 @Override
   >                 public void run() {
   >                     syncSDKInit(RenderPageUrl);
   >                 }
   >             }, 100);
   >         } else {
   >             jumpPage(RenderPageUrl);
   >         }
   >     }
   > ```
   这样写应该会好一点,我试一下,多谢
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] FightingForDevelop commented on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
FightingForDevelop commented on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647887893


   > isInitialized
   
   这样写应该会好一点,我试一下,多谢


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] FightingForDevelop removed a comment on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
FightingForDevelop removed a comment on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647887893


   > isInitialized
   
   这样写应该会好一点,我试一下,多谢


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-weex] aidy-automan edited a comment on issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0

Posted by GitBox <gi...@apache.org>.
aidy-automan edited a comment on issue #3113:
URL: https://github.com/apache/incubator-weex/issues/3113#issuecomment-647872385


   你现在还是白屏吗?weex应该都是我们自己人在用吧!
   白屏我遇到过很多问题,主要还是代码有问题,所以还是直接吧完整的代码贴出来,好一点


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org