Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Tag Manager error with loadContainerPreferNonDefault JSONArray not supported

When calling

PendingResult<ContainerHolder> pending = tagManager.loadContainerPreferNonDefault(CONTAINER_ID, R.raw.gtm_json);

I get the following error: java.lang.RuntimeException: JSONArrays are not supported

For the analytics library I'm using com.google.android.gms:play-services-analytics:8.1.0

Now when I edit the gtm_json file to remove all the JSON Arrays, it works fine, but obviously we don't want to do that.

Am I missing something?

like image 411
abounket Avatar asked Mar 22 '26 08:03

abounket


1 Answers

The container is not published yet so Download is not enabled. enter image description here

Export is NOT the correct method, it creates a JSON file that is primarily used to copy configurations within the tag manager GUI.

With a published mobile container you will have the Download option. Using the downloaded file the issue will be gone.

like image 173
crubio Avatar answered Mar 24 '26 02:03

crubio