LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

FlowUploadImproved - Summer '23 Issue Uploading for Guest User

Open sfscgjohnson opened this issue 2 years ago • 7 comments

Steps to reproduce the behavior:

  1. Go to flow with fileuploadimproved component on Summer '23 instance
  2. Click on Upload
  3. Select File and click upload
  4. See error: 168 KB filesname.jpg upload progress is 0% Can't upload filename.jpg.

Expected behaviour

File should be uploaded

Actual behaviour

Get Error Message seen above this is after Summer '23 was added to the org.

sfscgjohnson avatar May 12 '23 20:05 sfscgjohnson

I see that it is trying to go here: https://mysiteaddress.com/chatter/handlers/file/body

Request Method: POST Status Code: 400 Remote Address: Referrer Policy: origin-when-cross-origin

sfscgjohnson avatar May 15 '23 16:05 sfscgjohnson

I tried duplicating this and am not able to are you still getting this error @sfscgjohnson?

jdayment avatar Jun 13 '23 20:06 jdayment

if it helps. I'm also getting this. The issue doesn't present itself when ran in debug, but when the flow is ran from a guest user on an Aura experience cloud, i see similar to what @sfscgjohnson sees.

Request URL:
https://mysite.sandbox.my.site.com/RMA/chatter/handlers/file/body
Request Method:
POST
Status Code:
400
Remote Address:
anIP:443
Referrer Policy:
origin-when-cross-origin

Is there anything specific you need to help understand this some more?

Ashpork avatar Jul 20 '23 12:07 Ashpork

I am no longer getting it because Security determined that uploading files for guest users without tying them to a contact record was a security violation (this isn't a community). So we removed the ability from Guests to upload. That's not to say the issue still doesn't occur but my org no longer has this as an issue.

sfscgjohnson avatar Jul 20 '23 15:07 sfscgjohnson

@jdayment I have the same issue to report. A 400 is returned in the console, and in the body it says:

while(1); {"errormessage":"The action you performed was invalid for your session. Please refresh your page and try again."}

Context: I am running the flow with fileupload component in an aura experience cloud site. Guest user has acces via the permission set. I use the pattern in which the file is related to a new record in a later part of the flow. Everything seems to run normal. And the flow also works in debug mode.

Could this be related in some way to the InterviewGuid? As I understood the docs that could not be breaking it, but it seems in anyway related to some session id I guess?

This is a form on a public website. I could provide you the link if you want for reproducing?

rutgergernandt avatar Aug 17 '23 15:08 rutgergernandt

InterviewGuid is only used as a form of data-id to help with some of the cacheing that occurs the error seems to be related with guest user permissions and possibly the site security settings. Sorry I am not much help on this one as I am not able to duplicate it on a few sites both on Summer 23 and Winter 24

jdayment avatar Sep 22 '23 16:09 jdayment

@jdayment thanks for looking into it. From Googling the message error it seems to related with the session id, some suggest proxy settings or invalid cross domain (salesforce.com vs force.com).

Just checking: did you tried the component in an Aura site? Or in LWC only? I checked the code and I see you use the sessionKey. It seems related to an invalid session key, but I cannot really think of a reason the code would be problematic, other than when Aura and LWC are getting mixed up somewhere?

rutgergernandt avatar Sep 25 '23 16:09 rutgergernandt

I am still not able to duplicate any issues outside of perm related.

jdayment avatar Jun 24 '24 20:06 jdayment