title: Flutter AppUpdateService linkToDeath
body: <p>I have been trying to add the in app update feature to make the user update the app when there is a new update available in the playstore. I am using the package <a href="https://pub.dev/packages/in_app_update" rel="noreferrer">in_app_update</a>.</p>
  <p>But it keeps throwing this error,</p>
  <pre><code>I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : requestUpdateInfo(com.example.app)
  I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : Initiate binding to the service.
  I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.installservice.DevTriggeredUpdateService})
  I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : linkToDeath
  I/PlayCore( 8420): UID: [10378]  PID: [8420] OnRequestInstallCallback : onRequestInfo
  I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : Unbind from service.
  W/JavaBinder( 8420): BinderProxy is being destroyed but the application did not call unlinkToDeath to unlink all of its death recipients beforehand.  Releasing leaked death recipient: com.google.android.play.core.internal.ac
  </code></pre>
  <p>The code I am using is,</p>
  <pre><code>try {
    if (Platform.isAndroid) {
      InAppUpdate.checkForUpdate().then((info) {
        setState(() {
          _updateInfo = info;
        });
      }).catchError((error) =&gt; print(error));
  
      if (_updateInfo?.updateAvailable == true) {
        InAppUpdate.performImmediateUpdate()
            .catchError((error) =&gt; print(error));
      }
    }
  } catch(e) {
      print(e);
  }
  </code></pre>
  <p>After failing with the above package for number of days I tried using another package named <a href="https://pub.dev/packages/native_updater" rel="noreferrer">native_updater</a>. This package also resulted in the same error. Although I followed their example, which should have worked.</p>
  <p>The output of <code>flutter doctor</code> is,</p>
  <pre><code>Doctor summary (to see all details, run flutter doctor -v):
  [✓] Flutter (Channel master, 1.22.0-10.0.pre.121, on Linux, locale en_US.UTF-8)
   
  [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
  [✓] Android Studio (version 4.0)
  [✓] Connected device (1 available)
  
  
  </code></pre>
  <p>I could not find any similar question or answer which is why had to post one.</p>
  <p>I am using a 64 bit Kali Linux machine.</p>