Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when opening certain notifications #304

Open
abhijeetviswa opened this issue Jan 18, 2021 · 1 comment · Fixed by #307
Open

NPE when opening certain notifications #304

abhijeetviswa opened this issue Jan 18, 2021 · 1 comment · Fixed by #307

Comments

@abhijeetviswa
Copy link
Member

2021-01-18 12:58:25.965 E/AndroidRuntime: FATAL EXCEPTION: main
    Process: crux.bphc.cms, PID: 15642
    java.lang.RuntimeException: Unable to start activity ComponentInfo{crux.bphc.cms/crux.bphc.cms.activities.CourseDetailActivity}: java.lang.NullPointerException
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: java.lang.NullPointerException
        at crux.bphc.cms.activities.CourseDetailActivity.resolveIntent(CourseDetailActivity.kt:62)
        at crux.bphc.cms.activities.CourseDetailActivity.onCreate(CourseDetailActivity.kt:39)
        at android.app.Activity.performCreate(Activity.java:7824)
        at android.app.Activity.performCreate(Activity.java:7813)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
        at android.os.Handler.dispatchMessage(Handler.java:107) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7356) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 

Certain notifications may not have a course id or the course may not be available locally. In such cases, the app should gracefully fetch the new app content in the MainActivity or CourseDetailActivity.
Additionally, MainActivity should handle the Home page course which contains the Site News announcements.

@abhijeetviswa
Copy link
Member Author

#307 partially fixed this issue.
Need to work on site notifications next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant