Kreetyk
Kreetyk

Reputation: 36

Google Play does not allow our app to be released with an error: java.lang.IllegalArgumentException: Max number of dynamic shortcuts exceeded

Our application is successfully built and works on all test devices and emulators, but Google autotests do not allow the application to be released. Here are the latest logs (motorola moto g(20)):

00-00 00:00:00.000     0     0 ? (none)  : --------- beginning of crash
05-31 05:23:55.793 23994 24043 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-2
05-31 05:23:55.793 23994 24043 E AndroidRuntime: Process: com.google.android.deskclock, PID: 23994
05-31 05:23:55.793 23994 24043 E AndroidRuntime: java.lang.IllegalArgumentException: Max number of dynamic shortcuts exceeded
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at android.os.Parcel.createExceptionOrNull(Parcel.java:2378)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at android.os.Parcel.createException(Parcel.java:2358)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:2341)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:2283)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at android.content.pm.IShortcutService$Stub$Proxy.setDynamicShortcuts(IShortcutService.java:674)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at android.content.pm.ShortcutManager.setDynamicShortcuts(ShortcutManager.java:144)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at ass.run(Unknown Source:44)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:923)
05-31 05:23:55.793 23994 24043 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at com.android.server.pm.ShortcutService.enforceMaxActivityShortcuts(ShortcutService.java:1653)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at com.android.server.pm.ShortcutPackage.enforceShortcutCountsBeforeOperation(ShortcutPackage.java:1336)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at com.android.server.pm.ShortcutService.setDynamicShortcuts(ShortcutService.java:1856)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at android.content.pm.IShortcutService$Stub.onTransact(IShortcutService.java:274)
05-31 05:23:55.793 23994 24043 E AndroidRuntime:    at android.os.Binder.execTransactInternal(Binder.java:1154)
05-31 05:23:55.793 23994 24043 E AndroidRuntime: 

We use the quick_actions package, but there are no dynamic shortcuts, we add only two actions when initializing the application:

void initQuickActions() {
WidgetsBinding.instance.addPostFrameCallback((\_) async {
final QuickActions quickActions = const QuickActions();

      quickActions.initialize((String shortcutType) {
        if (shortcutType == 'create') {
          _processSharingIntent('');
        }
      });
    
      quickActions.setShortcutItems(<ShortcutItem>[
        ShortcutItem(
          type: 'create',
          localizedTitle: navigatorKey.currentContext!.locale!.create,
          icon: 'add',
        ),
      ]);
    });

}

I tried to go through the packages that could cause problems, but I couldn't manage it. The logs say Process: com.google.android.deskclock, so I probably don't even have it directly related to our quick_actions.

Upvotes: 0

Views: 56

Answers (0)

Related Questions