Whenever I turn the debug mode, it gives me An hundled Exception error occurred

Asked

Viewed 31 times

1

That is the code

public override void OnCreate()
        {
            try
            {
                base.OnCreate();

                //If debug you should reset the token each time.
#if DEBUG
                FirebasePushNotificationManager.Initialize(this, true);
#else
                PushNotificationManager.Initialize(this,false);
#endif

                //Handle notification when app is closed here
                CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =>
                {
                };

                //CrossFirebasePushNotification.Current.Subscribe("Managers");
            }
            catch(Exception ex)
            {
                string err = ex.Message;
            }
        }

The mistake comes in this line

FirebasePushNotificationManager.Initialize(this, true);

EDIT1

After giving a clean and adding these lines to my csproj, no more error

<Target Name="RemoveGoogleServicesJsonStampFiles" BeforeTargets="BeforeBuild">
    <Delete Files="$(IntermediateOutputPath)\ProcessGoogleServicesJson.stamp" />
  </Target>

That seems to have solved.

  • Which error is triggered? Only Unhandled Exception?

  • @Arturotemplary, that’s right. I put a Try.. catch, but does not enter the catch, already triggers the exception. If comment works, but does not generate the token in debug

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.