BadRequestError: app s~one cannot access app s~two's data

34 views
Skip to first unread message

Vladimir Mihailenco

unread,
Oct 30, 2011, 1:49:12 PM10/30/11
to appengine-ndb-discuss
I transfered some data from one NDB app to another using remote_api
(using "Copy to another app" button in Datastore Admin). Now I am
getting error:

BadRequestError: app s~one cannot access app s~two's data

Could it be that some CustomProperty in NDB causes this error (for
example, it stores app ID with data)?

Partial traceback:

File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/apiproxy_stub_map.py", line 592, in get_result
return self.__get_result_hook(self)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
datastore/datastore_rpc.py", line 1426, in __get_hook
self.check_rpc_success(rpc)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
datastore/datastore_rpc.py", line 1182, in check_rpc_success
raise _ToDatastoreError(err)

Beech Horn

unread,
Oct 30, 2011, 1:52:03 PM10/30/11
to appengine-...@googlegroups.com
Normally that error means that:

remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION = ('HTTP_X_APPENGINE_INBOUND_APPID',
                                               ['other-app'])

is not set in appengine_config.py on the source app.

Don't have any problems with transfer using NDB.

Vladimir Mihailenco

unread,
Oct 30, 2011, 1:58:41 PM10/30/11
to appengine-ndb-discuss
I have both app IDs (source and target app ID) in
HTTP_X_APPENGINE_INBOUND_APPID on both sides. Probably it is too much
and I have to add only one ID...

Just to refine - I successfully copied data to another app and most
views work as expected. But some views (I found only one :) raise this
exception.

On Oct 30, 7:52 pm, Beech Horn <beechh...@gmail.com> wrote:
> Normally that error means that:
>
> remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION =
> ('HTTP_X_APPENGINE_INBOUND_APPID',
>                                                ['other-app'])
>
> is not set in appengine_config.py on the source app.
>
> Don't have any problems with transfer using NDB.
>
> Have a look athttp://code.google.com/appengine/docs/adminconsole/datastoreadmin.html

Beech Horn

unread,
Oct 30, 2011, 2:17:51 PM10/30/11
to appengine-...@googlegroups.com
Would need to know the model definitions for the views that are failing to see if the application id is being encoded.

AFAIK ndb does not cause additional restrictions for cross-app datastore usage.
Reply all
Reply to author
Forward
0 new messages