Chrome uploads prevented by BlockThirdPartyCookies registry key

Posting here as i think the recent upload issues in chrome may relate to this registry key BlockThirdPartyCookies which prevents the uploads to complete.

I discovered at work that this recently has beend added part of Windows GPO changes, having manually removed this made uploads working again.
As far I know chrome is possibly moving towards enabling this by default in future.

Can you please look into this for any temporary workarounds (does h5p require the cookie for the upload?!) and any possibly fix?

 

related posts:

The file you are trying to upload might be too large.

video or image upload fails using Chrome (macOS)

icc's picture

Hm, this seems a bit strange. The restriction should only take place if you are trying to upload the file to a different domain than the one in the URL field. Perhaps you have multiple domains pointing to your site and the form is submitting to the wrong one? You should be able to figure this out by looking in the Network tab of the DevTools in Chrome, use Ctrl(Cmd)+Shift+J to open.

Did you try an interactive video upload in chrome with this regkey enabled?

I'm using h5p as part of drupal, thus it's hosted on the same server (only one internal domain https://mydrupalserver)

FYI - See attached my dev tools showing an successful upload to /sites/default/files

working just fine with the regkey disabled

I just found out how to check the cookies being blocked in chrome and how to manuallay allow them,

turns out that even allowing the h5p.org domain does not mad any changes but there are still some cookies blocked from drupal and after allowing them it works. Looking further into it but i conclude it's unlikely h5p the issue, probably my SSO / drupal cookies. Sorry about that.

FYI - the below regkey setting allows certain domains to be used while thirdpartycookies are blocked, thus ensuring my drupal server works and allows for the chrome uploads with h5p :)

[HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\CookiesAllowedForUrls]
"1"="https://www.mydrupalserver.com"

icc's picture

Great to see that you got it working, and thanks for sharing the solution.
A bit strange that this should be enabled by default. My guess it could be related to some sort of security setup.

hi, markusd1984, I have set the regkey, but seems still can't upload.  Please see the attached. Any help would be grateful.

Attachments: 

plus, my chrome version is 78.0.3904.70

otacke's picture

Hi Bird!

Kind of - your console shows error 504 which indicates a timeout problem on the server, so the file might be too large for your server's config. Not something that H5P can be blamed for I think.

Best,
Oliver

I would check using different browsers to see if it's just with Chrome and also if any other uploads on the server/site work or just an issue with h5p.