[google-appengine] Re: How to connect Firebase Database from GOogle App engine

2019-01-15 Thread Linus Larsen
Ok, I think I got it now. With an app engine project using Cloud Datastore 
there is no way to create a firestore database, e.g the new firebase 
database. However
it's possible to create the old firebase database (aka real time database). 
Very confusing.

 

Den måndag 14 januari 2019 kl. 15:44:18 UTC+1 skrev Linus Larsen:
>
> So basically what you are telling me is there is no way for me to get FCM 
> messaging working with my existing app engine project that I have been 
> running
> for more or less 4 years now?
>
> I tried the Firebase Admin SDK for java, but I cannot initialise the 
> library since I need a database name, I cannot create a Firebase database 
> since I use Cloud Datastore.
>
> Creating a new Project, migrate all my services, payment infoetc, is a 
> bit overkill just to get push notifications to my mobile clients to 
> continue work as expected.
>
>
>
>
>
> Den måndag 14 januari 2019 kl. 15:20:00 UTC+1 skrev George (Cloud Platform 
> Support):
>>
>> Hi Linus, 
>>
>> You are indeed missing the fact that one can't as yet use Datastore and 
>> Firestore in the same project, one needs to choose at the start which 
>> functionality and features suit one's project better. The way you migrate 
>> from Cloud Messaging to FCM seems a separate issue. You may find related 
>> details, and an FAQ list on the "GCM and FCM Frequently Asked Questions" 
>> documentation page . 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/48b349ab-f078-481d-b189-6fd5b7b1982f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Error while deploying swift application

2019-01-15 Thread 'Tiago (Google Cloud Platform Support)' via Google App Engine
Hi Matt,

Indeed, this tutorial was originally published in March 20, 2017, and many 
things have changed since then. both in Google Cloud and in Swift.

If you’re still searching for a similar HelloWorld tutorial, I would 
suggest taking a look at this repository from the Google Cloud Platform 

 
on Kitura, another popular web framework and HTTP server implemented in 
Swift. Just make sure to change in the Package.swift file the majorVersion 
to 2 and the minor to 6 

 
in order to run the most up-to-date Kitura version available.


On Thursday, January 10, 2019 at 5:23:18 PM UTC-5, Matt Sanford wrote:
>
> You were certainly right, I added the "path" but now I am facing a 
> different issue. The Perfect library has a dependency that requires openssl 
> 1.0.2 but the version that is installed is 1.0.1 so the module is failing 
> to compile. It seems as though the tutorial that was posted is severely out 
> of date.
>
> On Wednesday, January 9, 2019 at 3:10:33 PM UTC-5, George (Cloud Platform 
> Support) wrote:
>>
>> Hello Matt, 
>>
>> What directory are you in, when you run the "gcloud app deploy" command? 
>> You are expected to be in the top-level directory, where the app.yaml 
>> configuration file is present. 
>>
>> You seem to lack a directory, by reference to: 
>>
>> TopLevelDirectory
>>   |- Package.swift
>>   |- Sources
>>|- MyAppName
>>  |- MyAppNameSource1.swift
>>  |- MyAppNameSource2.swift
>>
>> A directory named analogous to "MyAppName" seems to be missing. 
>>
>> It may prove helpful, for the sake of investigation, to actually use the 
>> "path" property, as advised in the error message, and determine this way 
>> which path is missing. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0e025680-4a23-4bfc-9341-11a9c3952d28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] What is the expected output for app_identity.get_default_version_hostname()

2019-01-15 Thread NP
Hello,

According to the App Identity documentation 


.By default, App Engine apps are served from URLs in the form 
http://.appspot.com, where the app ID is part of the hostname. 
If an app is served from a custom domain, it may be necessary to retrieve 
the entire hostname component. You can do this using the 
app_identity.get_default_version_hostname() method


However, when I print the output for 
app_identity.get_default_version_hostname(), it gives me 
http://.appspot.com.. not my custom domain. But if I look at 
my log files, the entry for host under the "protopayload" is my custom 
domain i.e. I see something like. 

protoPayload: {
@type: "type.googleapis.com/google.appengine.logging.v1.RequestLog"  
appEngineRelease: 
*appId: * 
cost: 1.16787e-7  
endTime: 
finished: true  
first: true  
*host: "*


My questions are

1) Does it mean app_identity.get_default_version_hostname() is not meant to 
give me my custom domain url?

2) If #1 is true, how do I programmatically determine the custom domain 
url? I don't want to hardcode it so that the same code can be used for 
different projects and different custom domain names

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/38fa3a38-4566-4905-a471-1a6867ecb651%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Domain Puzzle

2019-01-15 Thread Joshua Smith
I’m not going to pretend I have any idea how that spooky magic worked, but you 
solved my problem!

I’ll buy you a beer next time I’m near your googleplex.

-Joshua

> On Jan 14, 2019, at 4:56 PM, 'Tiago (Google Cloud Platform Support)' via 
> Google App Engine  wrote:
> 
> Hello Joshua,
> 
> The error message you provided indicates that the domain is currently in use 
> by some other project. You can add custom domains 
> 
>  using the Cloud Console, the Cloud SDK or through the App Engine APIs. In 
> your particular case, the best way to re-add the domain to this particular 
> project is to use the App Engine APIs since it gives you the additional 
> option to override any existing mappings for the domain in question 
> (assuming, of course, that the domain ownership has already been verified via 
> the Webmaster Central portal 
> ).
> 
> Here’s a brief set of instructions on how to use the API: 
> 1. Visit the API Explorer 
> 
>  and authorize OAuth requests to be performed for your account
> 2. Enter your App ID under appsId, set overrideStrategy to OVERRIDE, and 
> provide the domain in the body request as an “id” property. 
> 
> You can enable SSL support afterwards in the Cloud Console by going to App 
> Engine > Settings > Custom Domains, selecting the domain in question and 
> clicking on “Enable managed security”.
> 
> As for the G Suite mapping, in order to remove a primary domain in the Admin 
> Console, a second one has to be added and verified first. Then you can make 
> the newly added domain your secondary, and later remove the original domain. 
> This operation can cause issues with some G Suite services though, so I would 
> suggest going for the API and Cloud Shell routes first. 
> 
> 
> 
> 
> On Tuesday, January 8, 2019 at 10:38:11 AM UTC-5, Joshua Smith wrote:
> I have a site that I set up ages ago, back when you had to have gsuite to map 
> domains to google app engine.
> 
> On the GSuite console, it redirects the naked domain to www, as one did back 
> then. The redirect monkey is stupid, though, in that it discards the path 
> part of the URL.
> 
> Now I’d like to support the naked domain directly on GAE, but it won’t let me 
> because it says that the naked domain is already being used.
> 
> I can’t remove the mapping in gsuite, because there’s no button to remove it. 
> Only a button to change it (and there’s no “delete” option there).
> 
> Helpful screenshots attached.
> 
> Has anybody who’s been around forever like me managed to make the transition 
> to modern naked domains successfully?
> 
> -Joshua
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to google-appengine+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to google-appengine@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/google-appengine 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-appengine/d6900f1f-88e5-4008-8f1f-62c55502f51c%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/912DE869-E37D-41C0-BAA7-18C1FE29B971%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: The ghs.googlehosted.com is downing

2019-01-15 Thread 'Tiago (Google Cloud Platform Support)' via Google App Engine
Hello Diego,

I sent a ping to the three IPs you listed, plus the one in the screenshot 
you provided (172.217.29.51), and received successful responses (see 
attached). 

I can see that you already created a ticket in the Issue Tracker 
 to further investigate this. 
The Issue Tracker is indeed a better place to drive this to a resolution as 
its purpose is to make us aware of issues in our products, and as such 
we’ll follow up this discussion from there. 

On Thursday, January 10, 2019 at 5:23:17 PM UTC-5, Diego Damasio wrote:
>
> Hello.
>
> Some IPs attributed for ghs.googlehosted.com 
> 
>  are 
> down. I need all IPs  attributed for ghs.googlehosted.com 
> 
>  are 
> working.
>
> Make ping command at ghs.googlehosted.com 
> 
>  - 
> See the image.
>
> *Wrong IPs*: 
>
>
>- 172.217.29.115
>- 216.58.202.243
>- 172.217.30.19
>
>
> Can you help me?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ddadf1f4-2d79-491d-9efe-a3c0cae4e811%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] GAE gradle deployment fails

2019-01-15 Thread Christian Golcic
Usually works like a charm, but now I'm getting this:

* What went wrong:
> Execution failed for task ':appengineDeploy'.
> > com.google.cloud.tools.appengine.api.AppEngineException: 
> com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandlerException: 
> com.google.cloud.tools.appengine.api.AppEngineException: Non zero exit: 1
> * Try:
> Run with --info or --debug option to get more log output. Run with --scan 
> to get full insights.
> * Exception is:
> org.gradle.api.tasks.TaskExecutionException: Execution failed for task 
> ':appengineDeploy'.
> at 
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
> at 
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
> at 
> org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
> at 
> org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
> at 
> org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
> at 
> org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
> at 
> org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
> at 
> org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
> at 
> org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
> at 
> org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
> at 
> org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
> at 
> org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
> at 
> org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
> at 
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
> at 
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
> at 
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
> at 
> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
> at 
> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
> at 
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
> at 
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
> at 
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
> at 
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
> at 
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
> at 
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
> at 
> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
> at 
> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
> at 
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
> at 
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:59)
> at 
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:128)
> at 
> org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
> at 
> org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
> at 
> org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
> at 
> org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
> at 
> org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:46)
> at 
> org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
> at 
> 

[google-appengine] Re: Laradock / Laravel deploy to App Engine Flexible not working

2019-01-15 Thread Mike P
Well. After hours of trying a bunch of different things, I emptied my head, 
sat down again and started at the beginning. It was then I realized how 
stupid I've been.

Anyhow, the extension bcmath was missing. I thought I read somewhere that 
by default, the bcmath extension was turned on in the Google App Engine's 
PHP runtime. This was not the case.

So after slowly reading this 
https://cloud.google.com/appengine/docs/flexible/php/runtime I figured out 
that all I needed to do was enable the bcmath extension in my composer.json 
as Google Cloud reads from this file.

"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/telescope": "^1.0",
"laravel/tinker": "^1.0",
"ext-bcmath": "*"
},

I added the "ext-bcmath", deployed the app and it worked!

On Monday, January 14, 2019 at 11:10:21 PM UTC+1, Mike P wrote:
>
> I'm trying to deploy my new Laravel project, however it fails as apparently 
> 'bcmath' is missing.
>
>
> I tried copying laradock's php.ini in the root of my project, but it doesn't 
> seem to work. Any clue on how I can fix this? I've been at this for a couple 
> of hours.
>  
>
> *This is the log:*
>
> starting build "bf1c72af-78f7-488b-bf02-8d0277ffbafe"
>
> FETCHSOURCE
> Fetching storage object: 
> gs://staging.wab-taco.appspot.com/eu.gcr.io/wab-taco/appengine/default.20190114t151355:latest#1547475265031675
> Copying 
> gs://staging.wab-taco.appspot.com/eu.gcr.io/wab-taco/appengine/default.20190114t151355:latest#1547475265031675...
> / [0 files][ 0.0 B/ 20.2 MiB] 
> / [0 files][264.0 KiB/ 20.2 MiB] 
> -
> - [0 files][ 4.1 MiB/ 20.2 MiB] 
> \
> \ [1 files][ 20.2 MiB/ 20.2 MiB] 
> Operation completed over 1 objects/20.2 MiB. 
> BUILD
> Starting Step #0
> Step #0: Pulling image: 
> gcr.io/gcp-runtimes/php/gen-dockerfile@sha256:d699fc436cdad6ca70ba189f792e9a38baefd5339ee7145570c569aefcc45a36
> Step #0: 
> sha256:d699fc436cdad6ca70ba189f792e9a38baefd5339ee7145570c569aefcc45a36: 
> Pulling from gcp-runtimes/php/gen-dockerfile
> Step #0: Digest: 
> sha256:d699fc436cdad6ca70ba189f792e9a38baefd5339ee7145570c569aefcc45a36
> Step #0: Status: Downloaded newer image for 
> gcr.io/gcp-runtimes/php/gen-dockerfile@sha256:d699fc436cdad6ca70ba189f792e9a38baefd5339ee7145570c569aefcc45a36
> Step #0: + php /builder/create_dockerfile.php create --php72-image 
> gcr.io/google-appengine/php72@sha256:0f0d6c07035fd5138d917b4d539f4473ca13528f11c26c92be54b9e33c0f722b
>  --php71-image 
> gcr.io/google-appengine/php71@sha256:5531e7edb33a0337440311e9ff8f012f1cd554c50bb9788eea3f96405004cfd3
>  --php70-image 
> gcr.io/google-appengine/php70@sha256:99731221e941d57a6807d9eb5491474d06488c2e8fcd9552227fb2d120e35c89
>  --php56-image 
> gcr.io/google-appengine/php56@sha256:70ac0d926c59517ea94897409dfa7c72a12c0e38d59f4a60794e910cdb2cdb02
> Finished Step #0
> Starting Step #1
> Step #1: Pulling image: 
> gcr.io/kaniko-project/executor@sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870
> Step #1: 
> sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870: 
> Pulling from kaniko-project/executor
> Step #1: 042c12654203: Pulling fs layer
> Step #1: e623e7f7d83e: Pulling fs layer
> Step #1: 4a78c04d4eaa: Pulling fs layer
> Step #1: bf1e1a1d843a: Pulling fs layer
> Step #1: bde2bd8edab4: Pulling fs layer
> Step #1: 9c94fd449ba4: Pulling fs layer
> Step #1: c1edeb5aef20: Pulling fs layer
> Step #1: bf1e1a1d843a: Waiting
> Step #1: bde2bd8edab4: Waiting
> Step #1: 9c94fd449ba4: Waiting
> Step #1: c1edeb5aef20: Waiting
> Step #1: e623e7f7d83e: Verifying Checksum
> Step #1: e623e7f7d83e: Download complete
> Step #1: 4a78c04d4eaa: Verifying Checksum
> Step #1: 4a78c04d4eaa: Download complete
> Step #1: 042c12654203: Verifying Checksum
> Step #1: 042c12654203: Download complete
> Step #1: bde2bd8edab4: Verifying Checksum
> Step #1: bde2bd8edab4: Download complete
> Step #1: c1edeb5aef20: Verifying Checksum
> Step #1: c1edeb5aef20: Download complete
> Step #1: bf1e1a1d843a: Verifying Checksum
> Step #1: bf1e1a1d843a: Download complete
> Step #1: 9c94fd449ba4: Verifying Checksum
> Step #1: 9c94fd449ba4: Download complete
> Step #1: 042c12654203: Pull complete
> Step #1: e623e7f7d83e: Pull complete
> Step #1: 4a78c04d4eaa: Pull complete
> Step #1: bf1e1a1d843a: Pull complete
> Step #1: bde2bd8edab4: Pull complete
> Step #1: 9c94fd449ba4: Pull complete
> Step #1: c1edeb5aef20: Pull complete
> Step #1: Digest: 
> sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870
> Step #1: Status: Downloaded newer image for 
> gcr.io/kaniko-project/executor@sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870
> Step #1: INFO[] Removing ignored files from build context: [.dockerignore 
> Dockerfile .git .hg .svn *~ .\#* app.yaml]