First line in URL list must be TsvHttpData-1.0 but it is Google Cloud Transfer Service Error - service

I am trying to import some csv files from Google Cloud to Google Cloud Storage(GCS), but I am getting the error. I can't seem to find what I did wrong. Please help!
URL List - https://drive.google.com/file/d/1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5/view?usp=sharing
Error - First line in URL list must be TsvHttpData-1.0 but it is: <!DOCTYPE html><html><head><meta name="google" content="notranslate"><meta http-equiv="X-UA-Compatible" content="IE=edge;"><style nonce="b0Ey8uWci6arZ81yZ1/Xyw">#font-face{font-family:'Roboto';font-style:italic;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1Mu51xIIzc.ttf)format('truetype');}#font-face{font-family:'Roboto';font-style:normal;font-weight:300;src:url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fBBc9.ttf)format('truetype');}#font-face{font-family:'Roboto';font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxP.ttf)format('truetype');}#font-face{font-family:'Roboto';font-style:normal;font-weight:500;src:url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fBBc9.ttf)format('truetype');}#font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBBc9.ttf)format('truetype');}</style><meta name="referrer" content="origin"><title>URL_List.txt - Google Drive</title><meta property="og:title" content="URL_List.txt"><meta property="og:type" content="article"><meta property="og:site_name" content="Google Docs"><meta property="og:url" content="https://drive.google.com/file/d/1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5/view?usp=sharing&usp=embed_facebook"><meta property="og:image" content="https://lh3.googleusercontent.com/4l6lCAvBKyWxCy42RcB_Y5_1vguKdkscpR8YAUHKTOb4hD8dYH_vrnRxTxMqowI8Zys=w1200-h630-p"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630"><link rel="shortcut icon" href="https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Google+Sans:300,400,500,700" nonce="b0Ey8uWci6arZ81yZ1/Xyw"><link rel="stylesheet" href="https://www.gstatic.com/_/apps-fileview/_/ss/k=apps-fileview.v.SN2xzHUByys.L.W.O/d=0/rs=AO0039uV2v8KOuxcH9eYr8HNmTKU5aI9VQ" nonce="b0Ey8uWci6arZ81yZ1/Xyw"><script nonce="i7nJhbgQY3EllroO23kuQg">_docs_flag_initialData={"docs-ails":"docs_cold","docs-fwds":"docs_sdf","docs-crs":"docs_crs_nfd","docs-shdn":0,"docs-tfh":"","info_params":{},"docos-eddmh":false,"docs-eohmo":false,"uls":"","docs-obsImUrl":"https://ssl.gstatic.com/docs/common/netcheck.gif","docs-api-keys":{},"buildLabel":"texmex_2022.16-Thu_RC00","docs-show_debug_info":false,"ondlburl":"https://docs.google.com","drive_url":"https://drive.google.com","app_url":"https://drive.google.com/file/","docs-itrf":false,"docs-gsmd":"","docs-eidfc":false,"docs-ecpvib":false,"docs-msid":32767,"docs-rid":1024,"docs-mif":1000,"docs-icdmt":[],"docs-mip":6250000,"docs-rawff":2,"docs-mib":5242880,"docs-mid":2048,"docs-sup":"/file","docs-seu":"https://drive.google.com/file/d/1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5/edit","docs-crp":"/file/d/1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5/view","docs-crq":"usp\u003dsharing","docs-ecvca":true,"docs-uptc":["lsrp","ca","sh","noreplica","ouid","dl","hi","hi_ext","usp","urp","utm_source","utm_medium","utm_campaign","utm_term","utm_content","aaac","sle"],"docs-doddn":"","docs-uddn":"","docs-cwsd":"","docs-epq":false,"docs-erdiiv":false,"docs-acap":["docs.security.access_capabilities",1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0],"docs-eefufs":false,"docs-eccfs":false,"docs-eefufd":false,"docs-hwg":"DISABLED","docs-hwst":"","docs-ndt":"Untitled Texmex","docs-prn":"","docs-een":false,"docs-as":"","docs-etdimo":false,"docs-mdck":"","docs-etiff":false,"docs-mriim":1800000,"docs-eccbs":false,"docs-rlmp":false,"docs-mmpt":15000,"docs-erd":false,"docs-erfar":false,"docs-ensb":false,"docs-ddts":false,"docs-uootuns":false,"docs-amawso":false,"docs-ofmpp":false,"docs-anlpfdo":false,"docs-eslars":true,"docs-eem":false,"docs-phe":"https://contacts.google.com","docs-wsu":"","docs-wsup":"","docs-pse":"PROD","docs-sccfo":"PROD","docs-eridm":false,"docs-pid":"","docs-eedmlf":false,"docs-emmda":false,"docs-efs":false,"docs-net-edsle":false,"docs-ricocpb":false,"docs-epmdup":false,"docs-rdowr":false,"docs-erep":false,"docs-effnp":false,"docs-cttmtbr":0,"docs-caaffso":true,"docs-eaaswoc":false,"docs-edpsf":true,"docs-edp":false,"docs-edlo":false,"docs-cttmteq":0,"docos-edces":false,"docs-dec":false,"docs-eiasrpu":false,"docs-ectt":false,"docs-ebbouf":false,"docs-ecgd":false,"docs-pcfloc":false,"docs-dsps":false,"docs-embmd":false,"docs-eesce":false,"docs-esmr":false,"docs-eawflb":false,"docs-iosdl":false,"docs-hft":"","docs-ececs":false,"docs-enfa":false,"docs-eerp":false,"docs-ecurf":false,"docs-efsii":false,"docs-plimif":6.0,"docs-elcfd":false,"docs-edmitm":false,"docs-enjec":false,"ecid":true,"docs-eir":false,"docs-eibs":false,"docs-mcciiu":false,"docs-hcwidu":false,"server_time_ms":1651222446455,"gaia_session_id":"","app-bc":"#d1d1d1","enable_iframed_embed_api":true,"docs-fut":"https://drive.google.com#folders/{folderId}","docs-isb":false,"docs-agdc":false,"docs-anddc":true,"docs-adndldc":false,"docs-dhnap":"drive.google.com","docs-ds":"https","docs-text-efnma":false,"docs-text-efrnma":false,"docs-cide":true,"docs-cn":"","docs-depquafr":false,"docs-frbanmc":false,"docs-rldce":false,"docs-dom":false,"docs-ecsup":false,"docs-edamc":false,"docs-edomic":false,"docs-eddm":false,"kix-edrat":false,"kix-edratv2":false,"docs-edhqlfr":false,"docs-eehlb":false,"docs-fwd":false,"docs-efpgwb":false,"docs-efu":false,"docs-eiecr":false,"docs-eiccp":false,"docs-elds":false,"docs-eph":false,"docs-epat":true,"docs-eppd":false,"docs-essph":false,"docs-tdd":false,"docs-rsc":"","docs-rgifem":true,"docs-ssi":false,"docs-uoci":"","docs-wia":"","docs-gth":"","docs-ef":false,"docs-ndsom":[],"docs-dm":"text/plain","docs-sdsom":[],"docs-po":"https://drive.google.com","docs-to":"https://drive.google.com","docs-eastd":true,"opendv":false,"onePickImportDocumentUrl":"","opmbs":5242880,"opmpd":2500,"opbu":"https://docs.google.com/picker","opru":"https://drive.google.com/relay.html","opdu":false,"opccp":false,"ophi":"texmex","opst":"","opuci":"","docs-eopiiv2":true,"projector_base_url":"//drive.google.com","docs-drk":[],"docs-erkpp":false,"docs-erkfsu":true,"jobset":"prod","docs-eqam":false,"docs-ehlib":false,"docs-efcm":false,"docs-euaool":false,"docs-eua":false,"docs-ebfgf":false,"docs-ehib":false,"docs-uahnt":"","docs-esap":false,"docs-efib":false,"docs-eidib":false,"docs-se":false,"docs-eisib":false,"docs-egf":false,"docs-uptuf":true,"docs-eodpb":true,"docs-odpl":false,"docs-surfb":false,"docs-odpdu":[null,null,null,"//drive.google.com/odp/dialog"],"docs-odpu":[null,null,null,"//drive.google.com/odp/embed"],"docs-dafjera":false,"docs-daflia":false,"docs-dafwsa":false,"docs-dafgfma":false,"docs-fta-fnrhci":false,"docs-spdy":true,"xdbcfAllowHostNamePrefix":true,"xdbcfAllowXpc":true,"docs-dbctc":false,"docs-iror":true,"docs-eirj":false,"promo_url":"","promo_second_url":"","promo_title":"","promo_title_prefix":"","promo_content_html":"","promo_more_element_text":"","promo_second_more_element_text":"","promo_element_id":"","promo_orientation":1,"promo_arrow_alignment":0,"promo_show_on_click":false,"promo_hide_arrow":false,"promo_show_on_load":false,"promo_mark_dismissed_on_show":false,"promo_use_material_styling":false,"promo_close_button_text":"","promo_icon_url":"","promo_action_id":"","promo_impression_id":0,"promo_is_contextual":false,"docs-ccwt":80,"docs-epcc":false,"docs-eoodwflb":false,"docs-era":true,"docs-msoil":"docs_spanner","docs-gsoil":"docs_gsabs","docs-fsd":false}; _docs_flag_cek= null ; if (window['DOCS_timing']) {DOCS_timing['ifdld']=new Date().getTime();}</script><script nonce="i7nJhbgQY3EllroO23kuQg">window.viewerData = {config: {'id': '1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5', 'title': 'URL_List.txt', 'isItemTrashed': false , 'documentResourceKey': '','enableEmbedDialog': true,'projectorFeedbackId': '99950', 'projectorFeedbackBucket': 'viewer-web',}, configJson: ["",null,null,null,null,1,null,null,null,1,1,[1,null,null,"AIzaSyDVQw45DwoYh632gvsP5vPDqEKvb-Ywnb8",0,null,1,null,null,"AIzaSyC1eQ1xj69IdTMeii5r7brs3R90eck-m7k",null,"/drive/v2beta",0,0,1,[0],null,1,null,0,1,1],null,5,1,null,null,1,"https://drive.google.com",null,null,1,null,1,null,null,null,null,null,1,null,null,[[null,"0"],6,1,1,null,null,null,1],null,1,null,null,[null,null,null,null,"https://accounts.google.com/ServiceLogin?service\u003dwise\u0026passive\u003d1209600\u0026continue\u003dhttps://drive.google.com/file/d/1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5/view?usp%3Dsharing\u0026hl\u003den\u0026followup\u003dhttps://drive.google.com/file/d/1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5/view?usp%3Dsharing",null,null,null,1],null,null,1,null,null,"https://docs.google.com",null,1,[null,0],["https://youtube.googleapis.com",null,2],1,null,null,null,1,null,1,1,null,null,null,null,[1,1,1,1],null,1,null,3,null,null,null,null,1,["AIzaSyCMp6sr4oTC18AWkE2Ii4UBZHTHEpGZWZM","https://blobcomments-pa.clients6.google.com",null,1,1,1,null,null,null,null,"ANONYMOUS_17612595759507348808"],null,1,null,null,0,null,null,1,null,null,null,[1,1,1],null,null,1,1,[null,null,"https://clients6.google.com","AIzaSyD_InbmSFufIEps5UAt2NmB_3LvBH3Sz_8","https://people-pa.googleapis.com",null,null,1,1,1,1],null,1,null,null,null,null,[0,0],null,null,null,null,0,null,0,1,null,null,null,null,null,null,[0,"","","",""],1,[null,null,0,0,0,0,1],null,1,[[null,null,null,"//drive.google.com/odp/embed"],null,"","AIzaSyCIGHYEdm91p31HKyJSoU4at7IqhCViXuA",1,null,[null,null,null,"//drive.google.com/odp/dialog"]],[1],null,null,null,null,1,"https://workspace.google.com",null,null,1,1,1,1,1,null,1,["AIzaSyCMp6sr4oTC18AWkE2Ii4UBZHTHEpGZWZM","https://drivemetadata.clients6.google.com"],0,1,1], itemJson: [null,"URL_List.txt","https://lh5.googleusercontent.com/fj9qJmqhNlMRAfkcUuBs0WZz2fMg5Mvuw9yQu8k75XLETScB2kVe8YEWPFewfF6Xi4kME9XUFwQZoQ\u003dw1600",null,null,null,null,null,null,"https://drive.google.com/viewerng/upload?ds\u003dAPznzaYdfa24fByFIZg3fiKWc8CSgJHZqTiK1CmXJ9rVoufvL2ZVY-c77RFjr0QfWH_8gXZ_3If1-BPOJC2MfrU2lobk9OMLJwckmaAtrFK_dFGEbOL7Xx_tHgs0CqxLbyAMnUfNms9lFfZAIhf9Mn9HJKhpSRjdSqWPjC4WItasfIIKE_5lQKM8lYajOJ8KQVNUvlM4N9Sj1muKZFPvtDJ7tkjNpv7zx5TwpUQj7xYKTFFm-RRal3LfLbGoD28UfBfDYx1aXLI2K6A2eRdBrVZswur9JwDTO8IIwBENy9RYKkdGgZl4wNR2PcriVj45SKOM2g4_gHRmTAYJMDOSwYPP0LpgiBTQX64fAXOhyWqPNLl0gYuVGWE%3D\u0026ck\u003ddrive\u0026p\u003dproj",null,"text/plain",null,null,6,null,"https://drive.google.com/file/d/1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5/view",null,"https://drive.google.com/uc?id\u003d1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5\u0026export\u003ddownload",null,5,0,null,null,null,[null,null,"101"],null,null,null,null,null,0,"txt",null,[["0B6td48lYowV-WGlDVUtiREtlYjBoNjN5b3pzeVR2U09kbHBJPQ"],[],["1gDWYfjr2FhSLTHUunQ5cBFmW82PR1vd5"]],null,null,null,null,null,null,0,null,0]};</script><script nonce="i7nJhbgQY3EllroO23kuQg">;this.gbar_={CONFIG:[[[0,"www.gstatic.com","og.qtm.en_US.XzJ0ONUNIso.O","com","en","25",0,[4,2,"","","","444135851","0"],null,"rqdrYsWIH5SfqtsPw_KygAo",null,0,"og.qtm.L8VIEKh59Qg.L.X.O","AA2YrTuxcq54HDP2gjPFC5ABnSWGsNBFIw","AA2YrTujoajh5TPNaG7eZGyhbqpOr6S54A","",2,1,200,"USA",null,null,"25","25",1],null,[1,0.1000000014901161,2,1],[1,0.001000000047497451,1],[0,0,0,null,"","","",""],[0,0,"",1,0,0,0,0,0,0,null,0,0,null,0,0,null,null,0,0,0,"","","","","","",null,0,0,0,0,0,null,null,null,"rgba(32,33,36,1)","rgba(255,255,255,1)",0,0,0,null,null,1,0,0],null,null,["1","gci_91f30755d6a6b787dcc2a4062e6e9824.js","googleapis.client:gapi.iframes","","en"],null,null,null,null,["m;/_/scs/abc-static/_/js/k=gapi.gapi.en.Yozr9QYVVr4.O/d=1/rs=AHpOoo8ePFN_mLj5L9BxNRnarRImlQEt0w/m=__features__","https://apis.google.com","","","","",null,1,"es_plusone_gc_20220321.0_p0","en",null,0],[0.009999999776482582,"com","25",[null,"","0",null,1,5184000,null,null,"",null,null,null,null,null,0,null,0,0,1,0,0,0,null,null,0,0,null,0,0,0,0,0],null,null,null,0,null,null,["5061451","google\\.(com|ru|ca|by|kz|com\\.mx|com\\.tr)$",1]],[1,1,null,28834,25,"USA","en","444135851.0",8,0.009999999776482582,0,0,null,null,null,null,"3700949",null,null,null,"rqdrYsWIH5SfqtsPw_KygAo",0,0,0,null,2,5,"rw",6],[[null,null,null,"https://www.gstatic.com/og/_/js/k=og.qtm.en_US.XzJ0ONUNIso.O/rt=j/m=qabr,q_dnp,qapid/exm=qaaw,qadd,qaid,qein,qhaw,qhbr,qhch,qhga,qhid,qhin,qhpr/d=1/ed=1/rs=AA2YrTuxcq54HDP2gjPFC5ABnSWGsNBFIw"]]]],};this.gbar_=this.gbar_||{};(function(_){var window=this;

URL to Tsv file must be publicly available. Looks like transfer service got HTML response with access error rather than the content of the TSV file.

The problem was that when you provide the URL to the, it must be to the link which allows you to download the file. You need to modify the URL for this. You can do this as shown below:
https://drive.google.com/open?id=FILE_ID
The FILE_ID is unique for every file in Google Drive. Then you’ll get a direct link to download the file from Google Drive

Related

Flutter web event listener on other windows

I have a flutter web application, Im trying to implement Okta oauth2 but whenever I call the url that I manage to create with some params using DIO package I end up with having html response instead of the actual response.
The endpoint I'm calling looks like this:
https://dev-xxxxxxxx.okta.com/oauth2/default/v1/authorize?response_type=code&scope=openid+profile+offline_access&client_id=xxxxxxxxxxxxxxxxxxxx&redirect_uri=http://localhost:8080/authorization-code/callback&code_challenge_method=S256&code_challenge=Wag0u2fyeYWJHy_baK-XbMWO9H2xwUBii7R4Nvj761Y&sessionToken=20111jWBb2P2BoPIL-Atd0pk5QDImstT7EmYULPFMg2GoCGPgOrxKFl&state=X7hih1mUow&nonce=lSfF1CxmmR
Whenever I call this url it shall be redirected to another url such as:
http://localhost:8080/authorization-code/callback?code=TCifQEab0a6HwEGeWQXlDQhPm22RlyemvO5GbipASEU&state=YLi4I2P4qd
So the main point using DIO is that its returning the response of the second url which is an html flutter content.
It can be solved if DIO don't follow the redirection and give status code 302 but its not doing that.
Currently I'm trying different approach, I'm trying to open the url in a new window which immediately change to the second url.
My problem is how should I get the code from the second url and the cookies that the second url provide from the new opened window.
final html.WindowBase newWindow = html.window.open(url, "callback");
so at least how can I get the href from the newly opened window knowing that it changes after a while into the the flutter correct rout that I sat up.
Knowing that newWidnow.location.href is write only.
Okay I managed to solve that, leaving the solution if anyone faced the same issue.
under your /web directory create an html file and call it for example callback.html.
then paste this code inside it.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Auth</title>
<meta name="description"
content="Simple, quick, standalone responsive placeholder without any additional resources">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h2>Authentication Succeeded</h2>
<h3>Close this window if it didn't close by itself.</h3>
</body>
<script>
window.opener.postMessage(window.location.href, '*');
</script>
</html>
then set your Redirect URI as follows http://localhost:8080/callback.html
So in that case whenever you get the Redirect URI from oauth2 you get it as follows
http://localhost:8080/callback.html?code=TCifQEab0a6HwEGeWQXlDQhPm22RlyemvO5GbipASEU&state=YLi4I2P4qd
which will basically call the newly created html file callback.html.
In flutter side you'll need to do the following:
html.WindowBase popupWindow;
popupWindow = html.window.open(
url,
"Auth",
"width=400, height=500, scrollbars=yes",
);
String? code;
html.window.onMessage.listen((event) {
if (event.data.toString().contains('code=')) {
code = event.data.toString().split('code=')[1].split('&')[0];
}
});
await Future.delayed(const Duration(seconds: 2), () {
popupWindow.close();
});
Which will basically open the window, then capture the url and extract it, then close the window.
I hope this helps.
Use assign on Location to redirect to the Authorize endpoint of the Authorization Server.
window.location.assign('https://${yourOktaDomain}/oauth2/default/v1/authorize?...');

How to get user's name on Sign in with Apple?

I'm trying to authenticate users with Apple on the web (which is required as we also have an iOS app and have a Login with Facebook option and we have to bring Sign in with Apple too otherwise Apple rejects our app updates on iOS side) and here is my meta tags (with sensitive info redacted) as in Apple's example:
<meta name="appleid-signin-client-id" content="com.myapp">
<meta name="appleid-signin-scope" content="name email">
<meta name="appleid-signin-redirect-uri" content="https://my.return.url">
<meta name="appleid-signin-state" content="x login">
<meta name="appleid-signin-nonce" content="some number">
<meta name="appleid-signin-use-popup" content="false">
When the user taps the button it asks for sharing a name and/or email correctly:
I proceed, and my redirect URL is called as expected. However, when I decode the returned id_token I see only email and email_verified fields in addition to the JWT-related fields. I don't have anything related to the user's name. I know that the name field is populated only on the first auth so this is after a fresh login after removing my app from my Apple ID from the "Apps & Websites using Apple ID" page. If I change appleid-signin-scope on meta tags to name I don't get an email either, so that value is somehow being respected. I also haven't touched anything regarding the name field as in the screenshot (I could proceed by Touch ID without even clicking anything) yet the id_token can only have email, not name. I need to get users' names in addition to email in order to finish registration, and I'm forced to add Sign-in with the Apple option to push any updates to my iOS app. Many people have reported that they get the name only the first time (as clearly stated by Apple), but I'm not getting it even on the first time.
What am I doing wrong?
Unfortunately, it seems this isn't possible. However the name is returned as JSON in the response body from the "authorization" endpoint along with the id token. This is only available the first time a user signs in, when they give consent for your application to access their name and email address, not on subsequent sign-ins.
Apple documentation - Retrieve the User’s Information
If you request the user’s full name, Sign in with Apple collects the information to pass along to your app. The name defaults to the user’s name from their Apple ID, but the user can change their name. The modified name is only shared with your app and not with Apple, and hence isn’t included in the ID token.
Response from "https://appleid.apple.com/auth/authorize" including "user" object:
{
"code": "AUTH_CODE",
"id_token": "ID_TOKEN",
"user": {
"name": {
"firstName": "Jeb",
"lastName": "Kerman"
},
"email": "jeb.kerman#apple.com"
}
}
Apple documentation - Handle authorization Response
The code needs to request the UserI property, as specified in the Sign in with Apple API documentation.
Sample:
<meta name="appleid-signin-client-id" content="com.myapp">
<meta name="appleid-signin-scope" content="UserI">
<meta name="appleid-signin-redirect-uri" content="https://my.return.url">
<meta name="appleid-signin-state" content="x login">
<meta name="appleid-signin-nonce" content="some number">
<meta name="appleid-signin-use-popup" content="false">

VSCode cross-origin request inside WebView

I'm working on extension which based on VSCode WebView. Extension make integration with issue tracking system over HTTP API, like Jira. I want to render information about issue in WebView and create some forms for making comments and changing issue status. I don't want to use message passing between extension and WebView. When I try to create HTTP request to API inside WebView I got error:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Server does't support Access-Control-Allow-Origin for "null" or "localhost" Origin.
Is the way to create HTTP request from WebView to server ignoring missing Access-Control-Allow-Origin header? Maybe I can setup some policy for WebView panel? Or create localhost proxy inside extension and make request over proxy?
Code example
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('catCoding.start', () => {
// Create and show panel
const panel = vscode.window.createWebviewPanel(
'catCoding',
'Cat Coding',
vscode.ViewColumn.One,
{enableScripts: true}
);
// And set its HTML content
panel.webview.html = getWebviewContent();
})
}
function getWebviewContent() {
return `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cat Coding</title>
</head>
<body>
<script>
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://google.com', true);
xhr.send();
</script>
</body>
</html>`;
}
Answer from Github Issue
There is no vscode support for changing this. You should think of the webview more as an html view (one that does not have any server or origin) rather than a webpage
Posters on stackoverflow may have suggestions for workarounds
Support for Cross Origin Isolation was just added for Webview through the use of the vscode-coi url parameter; see https://github.com/microsoft/vscode/issues/137884

Get WebVR working with Chrome on Samsung S8

I found many websites that suggests WebVR works on Chrome since version 56. I have Chrome v.62 working on a Samsung S8 (I even tried Chrome Canary which v65) and when I execute the simple sample code like this is one for instance:
https://github.com/mdn/webvr-tests/blob/master/basic-display-info/index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>VRStageParameters basic test</title>
</head>
<body>
<h1>VRStageParameters basic test</h1>
<p id='toto'></p>
</body>
<script>
var info = document.getElementById('toto');
var vrDisplay;
if(navigator.getVRDisplays) {
reportStageParams();
} else {
info.innerHTML = 'WebVR API not supported by this browser.'
}
function reportStageParams() {
info.innerHTML = 'IS WORKING SOMEHOW'
navigator.getVRDisplays().then(function(displays) {
vrDisplay = displays[0];
var stageParams = vrDisplay.stageParameters;
// stageParams is a VRStageParameters object
if(stageParams === null) {
info.textContent = 'Your VR Hardware does not support room-scale experiences.'
} else {
info.innerHTML = '<strong>Display stage parameters</strong>'
+ '<br>Sitting to standing transform: ' + stageParams.sittingToStandingTransform
+ '<br>Play area width (m): ' + stageParams.sizeX
+ '<br>Play area depth (m): ' + stageParams.sizeY
}
});
}
</script>
</html>
I keep getting the message WebVR API not supported by this browser.?? I don't understand why. Can someone with experience setting up WebVR please tell me what I need to do in order to make it work? I use a recent phone, the latest version of the browser, so it almost seems like I need to activate WebVR somewhere in some settings but can't find anything on the web.
In fact this question was asked and already answers (to some extent):
How to enable WebVR on Google Chrome?
Strangely, this is really the first step in getting WebVR working and it's not explained in most tutorials and official websites on WebVR... so here is:
You need to go to chrome://flags
and then scroll down until you find WebVR specific features and enable the ones you want.

how to copy folder in cloudme programmatically

i want to make my iphone app can connect to some webdav server using flycode in this site , i've done with all implementation, but i have problem in copying folder in cloudme server. I dont have this problem in another webdav server. The response code i have in this process is 403, and the response strings are :
response string :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 403 COPY needs a file as source</title>
</head>
<body>
<h2>HTTP ERROR: 403</h2>
<p>Problem accessing /myApp/xios/Documents/myDirectory///. Reason:
<pre> COPY needs a file as source</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>
this is the code that i use to called copy method in flying code webdav :
NSURL *urlFrom = [[NSURL alloc] initWithScheme:#"https" host:[prefs objectForKey:#"idiskhost"] path:fromPath];
NSURL *urlTo = [[NSURL alloc] initWithScheme:#"https" host:[prefs objectForKey:#"idiskhost"] path:[NSString stringWithFormat:#"%#/",forPath]];
[[[MyAppWebDAVRequest requestToURL:urlFrom] synchronous] copyToDestinationURL:urlTo];
did cloudme support for copy folder? or am i did something wrong with the code?
I have solve this case, the problem is CloudMe didn't give any permission to copy a folder, I now this from the system response log.