I'm trying to use the Cross-Domain Javascript Library to query the host page in a provider hosted app for SharePoint Online. When I'm executing a query with the cross-domain library I get the following error
App Web is not deployed for this app's request url
I find this strange since I have both an SPHostUrl and SPAppWebUrl in the querystring. I added a List instance to the Sharepoint add-in so that an SPAppWebUrl should be created and it seems like so if you check the url. If I run the same query directly in the browser everything works as expected.
This is the query
https://app.sharepoint.com/_api/SP.AppContextSite(@target)/web/getFolderByServerRelativeUrl('/')?@target=%27host.sharepoint.com%27&$expand=Folders/Properties,Files/ModifiedBy
Does anyone know why I'm getting this error even though I seem to have an SPAppWebUrl.