[google-appengine] GCP Cloud Storage - Signed URL - No 'Access-Control-Allow-Origin' header is present on the requested resource

2017-10-17 Thread Raunak Gupta


I create a signed URL on my server on app engine and return the URL to the 
front-end webapp. The webapp then makes a HTTP Options (succceeds) followed 
by a PUT which fails with the error:

Failed to load 
https://storage.googleapis.com/bucket-name/rvDThZx1R6Od8zqHx7_rqQ.png?GoogleAccessId=uplo...@appspot.gserviceaccount.com=1508253581=uYA0OR4IyUAV8u5ur89dm0NJYMei8BEu2TKP4pLqHvwl8kR0DTrPJ3xdJxxJRfs3WW7bK9gdITU%2Bttd%2BNRiyCxDiZzNPKT5WeRkAj17AJnLIP4JbRdBp9gR5f5wq1c4aPfNm%2FpZyNfBA%2BwJRKysECUgYBYehDo5WvyQhpHG9A%3D%3D:
 
Response to preflight request doesn't pass access control check: No 
'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'https://example.appspot.com' is therefore not allowed access.


I've looked through the documentation and cannot figure out what is going 
on. I understand that you need to set cors on the bucket if you use the XML 
API, not JSON, however, I don't think I'm using either XML/JSON API as I 
generate the signed URL on the server directly. Either way, to be safe, 
I've set cors on my bucket as follows:

[
  {
"origin": ["*"],
"responseHeader": ["Content-Type", "Access-Control-Allow-Origin"],
"method": ["PUT"],
"maxAgeSeconds": 3600
  }
]

The OPTIONS has the following request headers

:authority:storage.googleapis.com
:method:OPTIONS
:path:/bucket-name/rvDThZx1R6Od8zqHx7_rqQ.png?GoogleAccessId=uplo...@appspot.gserviceaccount.com=1508253581=uYA0OR4IyUAV8u5ur89dm0NJYMei8BEu2TKP4pLqHvwl8kR0DTrPJ3xdJxxJRfs3WW7bK9gdITU%2Bttd%2BNRiyCxDiZzNPKT5WeRkAj17AJnLIP4JbRdBp9gR5f5wq1c4aPfNm%2FpZyNfBA%2BwJRKysECUgYBYehDo5WvyQhpHG9A%3D%3D
:scheme:https
accept:*/*
accept-encoding:gzip, deflate, br
accept-language:en-US,en;q=0.8
access-control-request-headers:authorization,content-type,media-type,x-goog-meta-media-type,x-goog-meta-uid
access-control-request-method:PUT
origin:https://example.appspot.com
referer:https://example.appspot.com/
user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
x-chrome-uma-enabled:1
x-client-data:CIa2yQEIprbJAQjBtskBCLSZygEI+pzKAQipncoBCNKdygEI/6LKAQino8oB

The OPTIONS has the response headers below. The one thing I noticed was 
that the response doesn't contain Access-Control-Allow-Origin. I cannot 
figure out why this is.

alt-svc:quic=":443"; ma=2592000; v="39,38,37,35"
cache-control:private, max-age=0
content-length:0
content-type:text/html; charset=UTF-8
date:Mon, 16 Oct 2017 22:39:41 GMT
expires:Mon, 16 Oct 2017 22:39:41 GMT
server:UploadServer
status:200
vary:Origin
x-guploader-uploadid:AEnB2UpMXELd-l0wkyTd6jjS9LmX0IcJ9VjcXLfQfGDLY9jbVXkp-pwtXFbyw0_zfrqcwLFvEgDgdbPB9xdcbnFVpD2r94zd9A
 

Note: The upload works fine if I try it on POSTMAN. The webapp uses axios 
for file upload.

I don't know what else to do to debug this. Any help is really 
appreciated.  

-- 
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/43638992-8fce-4822-9b37-020cb6d09969%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Not able to create new app engine project

2017-10-17 Thread 'Sherin Sunny' via Google App Engine
Hi,

I am trying to create a new project as shown in the screenshot:

https://screenshot.googleplex.com/jA98azdyeDG

But its saying as "You don't have permissions to perform the action on the 
selected resource.".

Can someone suggest me whom to contact or how to change the settings to get 
the admin privilege for creating new appengine project in Pantheon.

Thanks
sherin

-- 
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/938d245a-ec14-43d1-8b7d-d21324b45605%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Google Cloud Load Balancer redirect HTTP to HTTPS

2017-10-17 Thread 'Jordan (Cloud Platform Support)' via Google App Engine
Redirects should occur on your backend configuration. Your Google Cloud 
Load Balancer will provide you with a 'X-Forwarded-Proto 
' 
header equal to a value of 'http' or 'https'. You would then configure you 
backend's '*.htacces*' file to redirect to HTTPS if the header is equal to 
'http' like so:

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule . https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]

- Note that if you are just hosting your site on Google Cloud Storage than 
you will not have a '.htaccess' file, since Cloud Storage is only able to 
server static website and not dynamic (aka it cannot execute any code). It 
is instead recommended to deploy an actual backend webserver to serve your 
website, such as a LAMP server on Compute Engine 
. 

-- 
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/c92b6d6e-8b06-4914-8d73-cdee1da55ac9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: When deploying a simple custom flexible nodejs app, the process gets stuck at "Updating service..."

2017-10-17 Thread 'Kenworth (Google Cloud Platform)' via Google App Engine
I cloned your repository and tried it on my VM. It took me around 5-9 
minutes on a couple of retries (this is normal by the way). How long does 
it get stuck on your end? You can also send me privately the log result of 
running 'gcloud app deploy --verbosity=debug'.

-- 
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/070f8bb6-ec89-4899-a420-b62aecb04b4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] When deploying a simple custom flexible nodejs app, the process gets stuck at "Updating service..."

2017-10-17 Thread Jean-Marc Arsan
When deploying nodejs custom flex containers to the google app engine, the 
process never finalizes and gets stuck at "Updating service..."
To help troubleshoot this issue, I created a simple "hello world" http 
server (available here: 
https://nodejs.org/en/docs/guides/nodejs-docker-webapp/) and then used the 
gcloud gen-config command.

gcloud beta app gen-config --custom
echo "service: test-node-fail" >> app.yaml
gcloud app deploy



My repository is available here: 
https://github.com/arsanjea/test-node-fail/blob/master/server.js
On my machine, the following commands work perfectly (I can browse the app 
on http://localhost):


docker build . -t testnodefail
docker run -p 80:8080 -d testnodefail

I've been struggling to make this work for the past 8 hours. Cancelling my 
plans to move to google cloud if I can't resolve it soon :(

-- 
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/18dc4145-535c-449d-8fc7-bfaea5a32120%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Issue while deploying Spring-petclinic On GAE

2017-10-17 Thread 'George (Cloud Platform Support)' via Google App Engine
Hello Ramu, 

This issue is identical to https://issuetracker.google.com/67874986 from 
the public tracker. It is better to follow developments in that thread that 
you started earlier. 

-- 
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/221a5545-363c-4610-920f-2710f5f2db16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Google App Engine is slow to deploy, hangs on "Updating service [someproject]..."

2017-10-17 Thread Jean-Marc Arsan
Experiencing the same issue with google-appengine :(. I was trying to 
migrate from AWS; however, after banging my head for the past few hours. 
I'll probably quit if it can't complete by tomorrow.

On Thursday, August 24, 2017 at 3:19:11 PM UTC-4, Samuel Cousin wrote:
>
> Thanks for the debug info! I'm experiencing the exact same issue but with 
> a nodejs 8.x environment. This inertia to deploy a mere 100 lines of JS is 
> really testing my limit...
>
> On Monday, August 21, 2017 at 8:06:19 PM UTC+1, Adrien Di Pasquale wrote:
>>
>> Hi ! I'm experiencing the same slowness : the "Update service ...|" step 
>> is taking anywhere from 5 to 30 minutes. 
>>
>> Here is what I've tried so far to fix it, without success: 
>> - use a different region (I've switched from europe-west to us-central)
>> - deploy the hello_world app from the sample github repo
>> - use the `no-promote` option
>> - use the `manual_scaling: instances: 1` option in app.yml
>>
>> I've isolated it down to a single operation that hangs, it's always the 
>> same :
>> ```
>> $ gcloud app operations describe [...]
>> metadata:
>>   '@type': type.googleapis.com/google.appengine.v1.OperationMetadataV1
>>   ephemeralMessage: Waiting for instances to become available for serving 
>> traffic.
>>   insertTime: '2017-08-21T13:18:17.363Z'
>>   method: google.appengine.v1.Versions.CreateVersion
>>   target: [...]
>>   user: [...]
>> name: [...]
>> ```
>>
>> After it finally completes (5-30 minutes), when I check back the 
>> operation with the same command, it consistently shows an endTime ~= 
>> insertTime + 10s. So I'm guessing there's a buggy delay in the callback 
>> that marks the operation as completed (this echoes a previous comment in 
>> this thread, that the operation is actually done, but not marked as such).
>>
>> Hope this can help ! This is ruining my first steps with GAE :/
>>
>> FYI I'm using Python Flexible Environment with python 3.6, so I'm 
>> guessing my next steps will be to try with 2.7 or the Standard environment.
>>
>> Le mercredi 16 août 2017 15:53:08 UTC+2, Gunar Cassiano Gessner a écrit :
>>>
>>> Hi Nick, thank you for the information.
>>>
>>> Are there any updates on decreasing GCLB configuration push times?
>>> Is there a way for me to bypass it if using "manual_scaling: instances: 
>>> 1"?
>>>
>>> Thank you,
>>> Gunar.
>>>
>>>

-- 
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/149739e9-4508-41d4-9102-6e78218bf016%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id: Invalid runtime specified.

2017-10-17 Thread 'Arms Yongyuth' via Google App Engine
Hi Abi,

How did you end up solving this problem.  I have an GCP account.  I was 
able to upload a few months ago.  Now I am getting this error:

Beginning interaction for module default...
Oct 16, 2017 9:31:29 PM 
com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: 
https://appengine.google.com/api/appversion/getresourcelimits?app_id=basic1234-182820=1;
403 Forbidden
You do not have permission to modify this app 
(app_id=u's~basic1234-182820').
This is try #0
Oct 16, 2017 9:31:29 PM 
com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: 
https://appengine.google.com/api/appversion/getresourcelimits?app_id=basic1234-182820=1;
403 Forbidden
You do not have permission to modify this app 
(app_id=u's~basic1234-182820').
This is try #1
Oct 16, 2017 9:31:29 PM 
com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: 
https://appengine.google.com/api/appversion/getresourcelimits?app_id=basic1234-182820=1;
403 Forbidden
You do not have permission to modify this app 
(app_id=u's~basic1234-182820').
This is try #2
Oct 16, 2017 9:31:29 PM 
com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: 
https://appengine.google.com/api/appversion/getresourcelimits?app_id=basic1234-182820=1;
403 Forbidden
You do not have permission to modify this app 
(app_id=u's~basic1234-182820').
This is try #3

com.google.appengine.tools.admin.HttpIoException: Error posting to URL: 
https://appengine.google.com/api/appversion/getresourcelimits?app_id=basic1234-182820=1;
403 Forbidden
You do not have permission to modify this app 
(app_id=u's~basic1234-182820').

Unable to update app: Error posting to URL: 
https://appengine.google.com/api/appversion/getresourcelimits?app_id=basic1234-182820=1;
403 Forbidden
You do not have permission to modify this app 
(app_id=u's~basic1234-182820').


Any help is appreciated.



On Saturday, May 23, 2009 at 2:05:54 AM UTC-7, Abi Fadeyi wrote:
>
> who sends the email? does some know the sender's email address or 
> email subject line? 
>
> On May 21, 3:06 pm, "myappcl...@gmail.com"  
> wrote: 
> > Hi Nick, 
> > 
> > Can you please help activate my account as well? I am seeing the same 
> > error. 
> > 
> > Thanks, 
> > Raj 
> > 
> > On May 21, 3:06 am, "Nick Johnson (Google)"  
> > wrote: 
> > 
> > > Hi Amit, 
> > 
> > > You should get an invitation email shortly. 
> > 
> > > -Nick Johnson 
> > 
> > > On Tue, May 19, 2009 at 7:36 AM, amitverma6523 <
> amitverma6...@gmail.com> wrote: 
> > 
> > > > hello Jason, 
> > 
> > > > i had not yet received email indicating google app engine for java 
> > > > activation... 
> > > > will you please help me out on how to get it. 
> > > > as it is more than 2-3 days that i had signed up. 
> > 
> > > > On Apr 9, 11:39 pm, Jason  wrote: 
> > > >> Have you received an email indicating your Google App Engine for 
> Java 
> > > >> account has been activated? In order to deploy your applications to 
> > > >> production, your account must be activated first: 
> > 
> > > >>http://code.google.com/appengine/kb/java.html#runtime 
> > 
> > > >> - Jason 
> > 
> > > >> On Apr 8, 1:22 pm, njaffer  wrote: 
> > 
> > > >> > Getting following error when attempting to upload using eclipse 
> plugin 
> > > >> > on a mac, using eclipse 3.3.x. 
> > 
> > > >> > Unable to upload: 
> > > >> > java.io.IOException: Error posting to URL:
> http://appengine.google.com/api/appversion/create?app_id=xxx=1; 
> > > >> > 400 Bad Request 
> > > >> > Invalid runtime specified. 
> > 
> > > >> > at com.google.appengine.tools.admin.ServerConnection.send 
> > > >> > (ServerConnection.java:114) 
> > > >> > at com.google.appengine.tools.admin.ServerConnection.post 
> > > >> > (ServerConnection.java:66) 
> > > >> > at com.google.appengine.tools.admin.AppVersionUpload.send 
> > > >> > (AppVersionUpload.java:345) 
> > > >> > at 
> com.google.appengine.tools.admin.AppVersionUpload.beginTransaction 
> > > >> > (AppVersionUpload.java:159) 
> > > >> > at 
> com.google.appengine.tools.admin.AppVersionUpload.doUpload 
> > > >> > (AppVersionUpload.java:68) 
> > > >> > at com.google.appengine.tools.admin.AppAdminImpl.update 
> > > >> > (AppAdminImpl.java:41) 
> > > >> > at 
> com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy 
> > > >> > (AppEngineBridgeImpl.java:203) 
> > > >> > at 
> > > >> > 
> com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace 
> > > >> > (DeployProjectJob.java:97) 
> > > >> > at 
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run 
> > > >> > (InternalWorkspaceJob.java:38) 
> > > >> > at 
> org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) 
> > > >> > java.io.IOException: Error posting to URL:
> 

[google-appengine] Issue while deploying Spring-petclinic On GAE

2017-10-17 Thread Ramu Immadi
https://cloud.google.com/community/tutorials/run-spring-petclinic-on-app-engine-cloudsql
 I 
am trying to deploy petclinic on GAE using the above url. did all the 
mentioned steps but still facing SQL related errors.. "Unknown syntax 
DATABASE." please help me out. It is said that it is using HSQL as default 
storage option. Later I followed the steps to convert the datasource to 
Cloud SQL by following the given steps. But facing issues. (Documentation 
is not very clear. Please help me out)

-- 
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/e447becc-cda7-490a-830e-ca9b31c0683e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.