I have setup the edx android app, But when i click on find course item, App Crashed
I have debug all the way.
Found
public class CourseInfoActivity extends FindCoursesBaseActivity {
public static final String EXTRA_PATH_ID = "path_id";
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_find_course_info);//after this call to a super class for setContentView
// app crashes
super.onCreate(savedInstanceState);
try{
environment.getSegment().screenViewsTracking(ISegment.Values.COURSE_INFO_SCREEN);
}catch(Exception e){
logger.error(e);
}
}
}
//crashing point
@Override
public void setContentView(int layoutResID) {
super.setContentView(layoutResID);
}
I am not getting why it si happening, Even i debug for path_id
It comes as https://webview.edx.org/course/rise-superheroes-impact-pop-culture-smithsonianx-popx1-1x-0
and it is opening in webbrowser, but in app it crashed
Please suggest me some helping points to resolve this.
08-14 16:26:23.602 14592-18873/org.edx.mobile E/org.edx.mobile.view.custom.URLInterceptorWebViewClient? java.lang.NullPointerException: Attempt to invoke virtual method 'org.edx.mobile.util.Config$ZeroRatingConfig org.edx.mobile.util.Config.getZeroRatingConfig()' on a null object reference
at org.edx.mobile.util.ConfigUtil.isWhiteListedURL(ConfigUtil.java:16)
at org.edx.mobile.view.custom.URLInterceptorWebViewClient.shouldInterceptRequest(URLInterceptorWebViewClient.java:195)
at com.android.webview.chromium.WebViewContentsClientAdapter.shouldInterceptRequest(WebViewContentsClientAdapter.java:325)
at com.android.org.chromium.android_webview.AwContents$IoThreadClientImpl.shouldInterceptRequest(AwContents.java:348)
at com.android.org.chromium.android_webview.AwContentsIoThreadClient.shouldInterceptRequest(AwContentsIoThreadClient.java:61)
08-14 16:26:23.603 14592-18873/org.edx.mobile E/org.edx.mobile.view.custom.URLInterceptorWebViewClient? java.lang.NullPointerException: Attempt to invoke virtual method 'org.edx.mobile.util.Config$ZeroRatingConfig org.edx.mobile.util.Config.getZeroRatingConfig()' on a null object reference
at org.edx.mobile.util.ConfigUtil.isWhiteListedURL(ConfigUtil.java:16)
at org.edx.mobile.view.custom.URLInterceptorWebViewClient.shouldInterceptRequest(URLInterceptorWebViewClient.java:175)
at android.webkit.WebViewClient.shouldInterceptRequest(WebViewClient.java:125)
at org.edx.mobile.view.custom.URLInterceptorWebViewClient.shouldInterceptRequest(URLInterceptorWebViewClient.java:204)
at com.android.webview.chromium.WebViewContentsClientAdapter.shouldInterceptRequest(WebViewContentsClientAdapter.java:325)
at com.android.org.chromium.android_webview.AwContents$IoThreadClientImpl.shouldInterceptRequest(AwContents.java:348)
at com.android.org.chromium.android_webview.AwContentsIoThreadClient.shouldInterceptRequest(AwContentsIoThreadClient.java:61)
08-14 16:26:23.672 14592-14592/org.edx.mobile D/org.edx.mobile.view.custom.URLInterceptorWebViewClient? loading: edxapp://course_info?path_id=course/rise-superheroes-impact-pop-culture-smithsonianx-popx1-1x-0
08-14 16:26:23.676 14592-14592/org.edx.mobile D/org.edx.mobile.view.FindCoursesActivity? PathIdrise-superheroes-impact-pop-culture-smithsonianx-popx1-1x-0
08-14 16:26:23.692 14592-14592/org.edx.mobile D/org.edx.mobile.view.FindCoursesActivity? next transition animation applied
08-14 16:26:23.694 14592-14592/org.edx.mobile D/org.edx.mobile.view.custom.URLInterceptorWebViewClient? found course-info URL: edxapp://course_info?path_id=course/rise-superheroes-impact-pop-culture-smithsonianx-popx1-1x-0
08-14 16:26:23.752 14592-14592/org.edx.mobile W/art? Attempt to remove local handle scope entry from IRT, ignoring
08-14 16:26:23.754 14592-14592/org.edx.mobile W/AwContents? onDetachedFromWindow called when already detached. Ignoring
08-14 16:26:23.760 14592-14592/org.edx.mobile D/AndroidRuntime? Shutting down VM
--------- beginning of crash
08-14 16:26:23.770 14592-14592/org.edx.mobile E/AndroidRuntime? FATAL EXCEPTION: main
Process: org.edx.mobile, PID: 14592
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.edx.mobile/org.edx.mobile.view.CourseInfoActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void roboguice.event.EventManager.fire(java.lang.Object)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2314)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
at android.app.ActivityThread.access$800(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void roboguice.event.EventManager.fire(java.lang.Object)' on a null object reference
at roboguice.activity.RoboFragmentActivity.onContentChanged(RoboFragmentActivity.java:136)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:381)
at android.app.Activity.setContentView(Activity.java:2154)
at org.edx.mobile.base.FindCoursesBaseActivity.setContentView(FindCoursesBaseActivity.java:46)
at org.edx.mobile.view.CourseInfoActivity.onCreate(CourseInfoActivity.java:16)
at android.app.Activity.performCreate(Activity.java:5953)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
at android.app.ActivityThread.access$800(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)