Why do my apostrophe-oembed Vimeo requests fail in hosted environment? - vimeo

I have tried to dig into this issue a few times now, but haven't had the time fully fix it.
Here is the issue: When deployed on Google Cloud Platform, I am unable to embed new videos, edit videos, or see proper previews of the already embedded videos. I get the Red X. Running locally everything works fine. Currently I have to run the app locally to edit or add any videos to my site.
What I'm seeing: When deployed this url will return a 404 /modules/apostrophe-oembed/query I've left out the domain and the query params, but that same url works just fine when running locally.
It is pretty tough to debug since the code runs fine when I can tinker with it.
This is primarily with Vimeo videos if that's of any consequence.

After a whole lot of debugging I discovered that Vimeo just doesn't like site scrapers. They end up blocking the domains of apps that scrape their pages regularly. That's how oembetter gets the oembed endpoint urls. The fix for this is a simple config in app.js.
In the modules block place this in the list of configs:
'apostrophe-oembed': {
endpoints: [
{ domain: 'vimeo.com', endpoint: 'https://vimeo.com/api/oembed.json' }
]
},
This stops the need for oembetter to scrape the page and it goes directly to vimeo's oembed endpoint.

Related

get method that shows in the google and chrome url

Hi i just installed a chrome in my new development laptop and every time I go to google is does this weird URL from chrome into the url
https://www.google.com.ph/?gfe_rd=cr&ei=OG9OVP7YIOqS8QeN4oCwCQ&gws_rd=ssl
anybody knows what it is and why it is showing up on my development pc I already know its a Get method?
or maybe my pc just got infected with a trojan or virus?
I have never encountered it before is it a crawler or robot
what does it do and will it affect me
Your PC is not infected.
You must be accessing google.com using http://www.google.com, you just need to use HTTPS instead of HTTP.
When you access google.com using HTTP then google redirects you to HTTPS site for google and appends all the information that you are getting in your url.
Hope it helped.
found the solution here

Chrome data compression proxy error

When I use youtube video upload API on mobile phone it uploads the video but before redirect to the redirect_url, most of the times it throws this error:
url with error: http://uploads.gdata.youtube.com/action/FormDataUpload/FSVfvf45g45g4FFDSGSdfgr24g3t34t3EFVFFDSFGgg3435?nexturl=http://my-redirect-url.com:80/uploaded
This page cannot be loaded via the chrome data compression proxy. Try reloading this page.
when I just reload the page it redirects to the right redirect_url and the video is uploaded appropriately.
What might be a solution to fix this error?
I am the tech lead for the Chrome data compression proxy. We happen to have some special case logic to deal with YouTube URLs in the proxy which would cause this, but this seems not to be working as expected. Can you give me an example of your use of the API? Is this a POST request? Seems like something we should be able to fix.
Youtube or Google updated something in apps/youtube_api (unclear what) but when I accesses the app console it was different, then I created a new app and it worked.

Chrome v31.0.1650.57 broke my packaged app webviews

I have a packaged app that requires me to be able to view saved, offlined web pages. These pages are downloaded from my server when the user is online and saved to the HTML5 filesystem so that they can be viewed offline. These are pages that cannot be packaged with the app. I have been using a webview to display this content in my app and this worked fine until the Chrome browser updated to v31.0.1650.57 (Nov. 9, 2013 build). Now I am getting 'ERR_FILE_NOT_FOUND' even though the content is definitely at the provided filesystem URL. The webviews still work fine on my two Chromebooks - an Acer running v29 and an HP running v30 - unless I go into developer mode and run in beta (which is v31.0.1650.57) instead of stable.
My question is what changed and how I fix it? Has Chrome tightened up the security to the point where I'll no longer be able to view these offlined web pages? Have new permissions been added that I need to include in my manifest to get my webviews to work again? I already have permissions for 'webview', 'unlimitedStorage', and the appropriate URL permissions for downloading the pages from my server.
My application is supposed to be given to the client around the first of December so this is a major surprise. Thankfully it didn't happen after the app went live.
Thanks in advance for your help.
*Update - I should point out that viewing an external URL such as 'http://stackoverflow.com' works fine. It is the filesystem URLs (filesystem:chrome-extension://[appId]/[pathToFile]) that are no longer working.
**Update 2 - Google has updated their 'webview' docs (https://developer.chrome.com/apps/tags/webview) but I still haven't been able to load filesystem URLs.
Perhaps this addresses your question? https://plus.sandbox.google.com/100132233764003563318/posts/hsNTHvbvEdo

Given URL is not allowed by the Application configuration. when using the Facebook Javascript SDK

Im currently using the Facebook Javascript SDK and I keep running into the following problem that appears in the console:
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
I've read a truck load of related posts but still can't get it to work. I am working locally using the following: http://localhost:8080/bookbayapp/. In my facebook developers app section I have the following:
But once again nothing seems to work. I am currently using Google Chrome for the testing and it is worth to mention that I am using the Facebook Plugin for Phonegap but when testing I comment out the link the to plugin js so I assume in doing this there shouldn't be any problems?
What works for me is using the actual URL of the production server, and then adding a line to the hosts file that redirects all traffic from that URL to localhost.
Let's say your website is called potatoes.com. In "Site URL" write:
http://potatoes.com/bookbayapp
and then open your hosts file (C:\Windows\System32\drivers\etc\hosts) and add the following line:
potatoes.com 127.0.0.1

Is it possible to make an HTML page and local Javascript library into a Chrome extension with data storage?

I have been trying to author a Chrome extension recently and have been hitting major problems it seems every step of the way.
Currently I have a local HTML page that is using a local Javascript library. This works great, except Chrome limits the amount of data a page can store to 5MB. I would like to get around this limit, and read that Chrome extensions/applications could use unlimited storage resources via chrome.storage.
While coding, I quickly discovered that this only applies to browser actions, content scripts, and (?) web applications (loading an WWW page as an extension). I was coding this as a local packaged app, which does NOT have access to either the HTML5 localStorage API NOR the chrome.storage API. I really need the extension to use only local HTML/Javascript resources in order to maintain offline/no-internet functionality.
Can a Chrome web app be loaded from a local resource, i.e. a locally packaged HTML page? Is there any way around these problems that does not include enabling dangerous security vulnerabilities in Chrome? I saw that an NPAPI app could solve the problem however that also defeats the purpose of the application I am making.
TIA,
Trann
Apparently this is possible with a packaged app, when the correct combination of permissions are put into the manifest.json:
"permissions": [
"storage",
"unlimitedStorage",
"fileSystem"
]
The fileSystem permission, once added, enabled the FileSystem API to start working as expected (not chrome.storage).