airbnb / DeepLinkDispatch

A simple, annotation-based library for making deep link handling better on Android
http://nerds.airbnb.com/deeplinkdispatch/
4.37k stars 407 forks source link

App is crashing after update from version 4.1 to 5.1 #282

Closed emartynov closed 4 years ago

emartynov commented 4 years ago

We have next code in our SplashActivity:

            // DeepLinkDelegate and AppDeepLinkModuleLoader are generated at compile-time.
            val deepLinkDelegate = DeepLinkDelegate(AppDeepLinkModuleRegistry())
            // Delegate the deep link handling to DeepLinkDispatch.
            // It will start the correct Activity based on the incoming Intent URI
            val deepLinkResult = deepLinkDelegate.dispatchFrom(this)

This code crashes inside of the library when Activity just launched from launcher:

    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference
        at com.airbnb.deeplinkdispatch.BaseDeepLinkDelegate.dispatchFrom(BaseDeepLinkDelegate.java:97)
        at com.airbnb.deeplinkdispatch.BaseDeepLinkDelegate.dispatchFrom(BaseDeepLinkDelegate.java:83)

Do we use library wrongly? Should we check that activity launched with Uri?

emartynov commented 4 years ago

Hi people, no release with this fix yet?

rossbacher commented 4 years ago

Not yet, sorry, we are working on a few more fixes. Should be soon though.

rossbacher commented 4 years ago

@emartynov I just published 5.2.0 with this fix included.