I am using Java to develop an Android app with Android-type GTM. After setting up, I published the container and wanted to preview the container. I generated a preview link and used adb command to preview it. However, it turned out to be a 400 error.
400. That's an error.
The server cannot process the request because it is malformed. It should not be retried. That's all we know.
Here is an example of the begin preview link:
adb shell am start -a "android.intent.action.VIEW" -d "tagmanager.c.com.dynamic_link_alternative://preview/p?id=GTM-XXXXXXX\>m_auth=zGwb1hAaQs5X09iwrEmoIw\>m_preview=14"
When I used it, there was a popup message saying:
Preview
Preview mode updated
Once tapped to continue, it went to the 400 error page. What I've tried:
Is there anything I missed? Any help is highly appreciated.
When I first installed the script, I got the log saying:
Ignoring container asset GTM-XXXXXXX_v14.json (does not match (gtm-[a-z0-9]{1,10})\.json)
I managed it into the correct regex matching and the error mentioned popped up. Fortunately, I tried the GTM-XXXXXXX.json
format, with all capital letters, and it worked eventually.