I am setting up server-side tagging using Ap engine. I follow the steps according to the official documentation here https://developers.google.com/tag-platform/tag-manager/server-side/app-engine-setup So my GCP project is created, as is my App engine.
Then I create my tagging server by following this shell script
bash -c "$(curl -fsSL https://googletagmanager.com/static/serverjs/setup.sh)"
But after I complete all the prompts, I get the following error message: ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: The first service (module) you upload to a new application must be the 'default' service (module). Please upload a version of the 'default' service (module) before uploading a version for the 'debug-server' service (module).
How do I upload this first 'default version'? Any help would be much appreciated.
Here is all the config:
Your configured settings are
Container Config: aWQ9R1RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXdw==
Policy Script URL: ''
Request Logging: off
Deployment Type: production
Autoscaling: on
Minimum Number of Servers: 3
Maximum Number of Servers: 6
CPU Target Utilization: 0.6
Do you wish to continue? (y/N): y
As you wish.
Services to deploy:
descriptor: [/tmp/tmp.wtPjxgoyOe/debug.yaml]
As you wish.
Services to deploy:
descriptor: [/tmp/tmp.wtPjxgoyOe/debug.yaml]
source: [/tmp/tmp.wtPjxgoyOe]
target project: [lXXXXXXX-web]
target service: [debug-server]
target version: [production]
target url: [https://debug-server-dot-XXXXXXX-web.lm.r.appspot.com]
target service account: [[email protected]]
Beginning deployment of service [debug-server]...
Created .gcloudignore file. See `gcloud topic gcloudignore` for details.
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 0 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: The first service (module) you upload to a new application must be the 'default' service (module). Please upload a version of the 'default' service (module) before uploading a version for the 'debug-server' service (module). See the documentation for more information. Python: (https://developers.google.com/appengine/docs/python/modules/#Python_Uploading%%20modules) Java: (https://developers.google.com/appengine/docs/java/modules/#Java_Uploading%%20modules)
I tried to create a tagging server using Google cloud App engine. But the creation process does not complete because of the stated error.
Every Google App Engine application needs to have a 'default' service. This is the App that is loaded when someone runs your App/loads the website.
In addition to the default service, you can have other services (which is essentially a different app under the same project) that can do other stuff.
From your comments, it seems that the script you've run for setting up the tagging server gives your service a name of
debug-server
. To fix your issue, there are at least 2 optionsa) Modify the script and delete the service name (when there's no service name, gcloud will take it to be the
default
service). You can also change the name todefault
b) Deploy a basic hello world app as your default service. You can use one of Google App Engine's sample Applications. Here are links for Python, NodeJS, PHP