Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileUploadImproved - allowMultiple - "Invalid output generated for field allowMultiple... Error when processing and converting between data types" #1483

Open
gbreavin opened this issue Nov 24, 2023 · 1 comment

Comments

@gbreavin
Copy link

Steps to reproduce

  1. Create a new Flow
  2. Add the FileUploadImproved Component as a screen element - just the Next button is needed
  3. Add a checkbox underneath (default value: unchecked), and set the Validate Input that the checkbox must be ticked before proceeding
  4. To summarise, the Flow should have the FUI component, a checkbox that is unticked, and validate logic such that the user can't proceed without ticking it
  5. Run the Flow - keep hitting the "Finish" button

This behaviour has been confirmed in Chrome.

Expected behaviour

Every click, you should be warned with the error message that was set above

Actual behaviour

Intermittently - about 1 in 6 times - you receive the following error message:

The Lightning Component FileUploadImproved generated invalid output for field allowMultiple. Contact your administrator with these details: Flow encountered an error when processing and converting between data types. Please check the flow and ensure all data types are matched correctly

Clicking again, the problem will likely go away, but keep clicking, and it'll come back at some point.

We have this happening in 5 sandboxes (on preview pods), but not in one of our other sandboxes (on a non-preview pod), and not in Production. All (including Production) are on the same release - Winter '24 Patch 14.8

This was only noticed in our sandboxes this week - the flows were on v57.0, updating to v59.0 does not appear to solve the issue.

There's this known issue, but few other details. Elsewhere there are suggestions that it might be session related i.e. clear browser cache and the problem goes away, but that doesn't seem to be the case.

Screenshots

image

Debug Logs

See below for some of the details of the network request.

First is the request to the server - this appears to be the same for both failure and success scenarios, so I've only included one. Note that on the way to the server, FileUploadOriginal.allowMultiple is true. This leads me to believe maybe it's something on the server?

Request to server
{
    "actions": [
        {
            "id": "72;a",
            "descriptor": "aura://FlowRuntimeConnectController/ACTION$navigateFlow",
            "callingDescriptor": "UNKNOWN",
            "params": {
                "request": {
                    "action": "FINISH",
                    "serializedState": "AAAA[...]fa8=",
                    "fields": [
                        {
                            "field": "FileUploadOriginal.allowMultiple",
                            "value": true,
                            "isVisible": true
                        },
                        {
                            "field": "FileUploadOriginal.contentDocumentIds",
                            "value": [
                                "06992000002CO6BAAW",
                                "06992000002CRPtAAO"
                            ],
                            "isVisible": true
                        },
                        {
                            "field": "FileUploadOriginal.contentVersionIds",
                            "value": [
                                "068920000031PJXAA2",
                                "068920000031STZAA2"
                            ],
                            "isVisible": true
                        },
                        {
                            "field": "FileUploadOriginal.recordId",
                            "value": "0019200000D4Ng5AAF",
                            "isVisible": true
                        },
                        {
                            "field": "FileUploadOriginal.uploadedFileNames",
                            "value": [
                                "a.csv",
                                "b.csv"
                            ],
                            "isVisible": true
                        },
                        {
                            "field": "Proceed",
                            "value": false,
                            "isVisible": true
                        }
                    ],
                    "uiElementVisited": true,
                    "enableTrace": true,
                    "lcErrors": {}
                }
            }
        }
    ]
}

Now for the responses - one where there is no issue, and the other when an issue occurs. When the issue occurs, it appears the server believes that allowMultiple is null.

Server Response - failure
{
    "actions": [
        {
            "id": "76;a",
            "state": "SUCCESS",
            "returnValue": {
                "error": null,
                "response": {
                    "reactiveFormulas": null,
                    "interviewStatus": "STARTED",
                    "flowLabel": "Debugging Error",
                    "helpText": null,
                    "locationName": "First_screen",
                    "cfvFeatureName": "cfv",
                    "currentFlowVersionId": "3019200000GsdRR",
                    "showHeader": false,
                    "debugTrace": {
                        "entries": [
                            {
                                "html": "<span style=\"font-weight:bold;\">How the Interview Started<\/span><br>\n<span>A User (005Mn000000jMik) started the flow interview.<\/span><br>\n<span>API Version for Running the Flow: 57<\/span><br>\n<\/p>\n"
                            },
                            {
                                "html": "<p>\n<span style=\"font-weight:bold;\">Transaction Committed<\/span><br>\n<span>Any records that the flow was ready to create, update, or delete were committed to the database.<\/span><br>\n<\/p>\n"
                            }
                        ]
                    },
                    "reactivityRules": [],
                    "showFooter": true,
                    "localActionName": null,
                    "localActionOutputs": null,
                    "featureGroupName": "flowclientruntime",
                    "navigationFeatureName": "navigation",
                    "pausedText": null,
                    "serializedEncodedState": "AAAAW3[...]Y4E=",
                    "apiVersionRuntime": 57.0,
                    "localActionInputs": null,
                    "guid": "8001f3a2d0fae0f18970384f5c5118c001f5f1a-75b4",
                    "outputVariables": null,
                    "fields": [
                        {
                            "outputs": [
                                {
                                    "dataType": "STRING",
                                    "name": "acceptedFormats",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "APEX",
                                    "name": "allowMultiple",
                                    "isCollection": false,
                                    "objectType": "Boolean"
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "contentDocumentIds",
                                    "isCollection": true,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "contentVersionIds",
                                    "isCollection": true,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "icon",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "label",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "recordId",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "uploadedFileNames",
                                    "isCollection": true,
                                    "objectType": null
                                }
                            ],
                            "isRequired": false,
                            "regionContainerType": null,
                            "extensionName": "c:fileUploadImproved",
                            "helpText": null,
                            "metadataValues": null,
                            "inputs": [
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "allowMultiple",
                                    "isCollection": false,
                                    "value": null,
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "cb_allowMultiple",
                                    "isCollection": false,
                                    "value": "CB_TRUE",
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "recordId",
                                    "isCollection": false,
                                    "value": "0019200000D4Ng5AAF",
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "renderExistingFiles",
                                    "isCollection": false,
                                    "value": true,
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "cb_renderExistingFiles",
                                    "isCollection": false,
                                    "value": "CB_TRUE",
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "renderFilesBelow",
                                    "isCollection": false,
                                    "value": true,
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "cb_renderFilesBelow",
                                    "isCollection": false,
                                    "value": "CB_TRUE",
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "visibleToAllUsers",
                                    "isCollection": false,
                                    "value": true,
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "cb_visibleToAllUsers",
                                    "isCollection": false,
                                    "value": "CB_TRUE",
                                    "objectType": null,
                                    "valueSources": []
                                }
                            ],
                            "dataType": "LIGHTNING_COMPONENT_OUTPUT",
                            "errorMessage": "The Lightning Component c:fileUploadImproved generated invalid output for field allowMultiple. Contact your administrator with these details: Flow encountered an error when processing and converting between data types. Please check the flow and ensure all data types are matched correctly.",
                            "isReactiveOnInit": false,
                            "label": null,
                            "extensionType": "lwc",
                            "name": "FileUploadOriginal",
                            "triggersUpdate": false,
                            "choices": null,
                            "contextMap": null,
                            "fields": [],
                            "value": null,
                            "fieldType": "COMPONENT_INSTANCE",
                            "visibilityRule": null,
                            "valueSources": null
                        },
                        {
                            "outputs": null,
                            "isRequired": false,
                            "regionContainerType": null,
                            "helpText": null,
                            "metadataValues": null,
                            "inputs": null,
                            "dataType": "BOOLEAN",
                            "errorMessage": "<p>Can&#39;t proceed!<\/p>",
                            "isReactiveOnInit": false,
                            "label": "Proceed",
                            "name": "Proceed",
                            "triggersUpdate": false,
                            "choices": null,
                            "contextMap": null,
                            "fields": [],
                            "value": false,
                            "fieldType": "INPUT",
                            "visibilityRule": null,
                            "valueSources": null
                        }
                    ],
                    "actions": [
                        {
                            "id": "FINISH",
                            "label": "Finish"
                        }
                    ],
                    "errors": null
                }
            },
            "error": []
        }
    ],
    "context": {
        "mode": "PROD",
        "app": "flowruntime:flowDebugLightningOut",
        "pathPrefix": "",
        "fwuid": "MDM0c01pMVUtd244bVVLc2VRYzQ2UWRkdk8xRWxIam5GeGw0LU1mRHRYQ3cyNDYuMTUuNS0zLjAuNA",
        "mlr": 1,
        "uad": 1,
        "descriptorUids": {
            "markup://c:fileUploadImproved": "gT6QmmZp2WQMBaqjxH8kSw"
        },
        "loaded": {
            "APPLICATION@markup://flowruntime:flowDebugLightningOut": "8x5eTo4iHlkTdJsxvrUC8w"
        },
        "globalValueProviders": [
            {
                "type": "$Global",
                "values": {
                    "eswConfigDeveloperName": {
                        "writable": true,
                        "defaultValue": ""
                    },
                    "isVoiceOver": {
                        "writable": true,
                        "defaultValue": false
                    },
                    "setupAppContextId": {
                        "writable": true,
                        "defaultValue": ""
                    },
                    "density": {
                        "writable": true,
                        "defaultValue": ""
                    },
                    "srcdoc": {
                        "writable": false,
                        "defaultValue": false
                    },
                    "appContextId": {
                        "writable": true,
                        "defaultValue": ""
                    },
                    "dynamicTypeSize": {
                        "writable": true,
                        "defaultValue": ""
                    }
                }
            },
            {
                "type": "$Label",
                "values": {
                    "LightningPrimitiveCellActions": {
                        "showActions": "Show actions"
                    }
                }
            }
        ],
        "enableAccessChecks": true,
        "dns": "c",
        "rns": [
            "omnistudio"
        ],
        "ls": 1,
        "lairn": [],
        "laerc": [],
        "lav": "59",
        "ln": 1,
        "csp": 1,
        "mna": {
            "lightning": "interop"
        },
        "lff": {
            "ENABLE_MIXED_SHADOW_MODE": false,
            "DISABLE_LIGHT_DOM_UNSCOPED_CSS": true,
            "ENABLE_LEGACY_SCOPE_TOKENS": false
        },
        "arse": 1,
        "acaf": 1,
        "services": [
            "markup://lightning:configProvider",
            "markup://force:salesforceScopedModuleResolver",
            "markup://force:ldsEngineCreator",
            "markup://instrumentation:locatorService"
        ]
    },
    "perfSummary": {
        "version": "core",
        "request": 63,
        "actions": {
            "76;a": {
                "total": 43,
                "db": 8
            }
        },
        "actionsTotal": 43,
        "overhead": 0
    }
}
Server Response - success
{
    "actions": [
        {
            "id": "72;a",
            "state": "SUCCESS",
            "returnValue": {
                "error": null,
                "response": {
                    "reactiveFormulas": null,
                    "interviewStatus": "STARTED",
                    "flowLabel": "Debugging Error",
                    "helpText": null,
                    "locationName": "First_screen",
                    "cfvFeatureName": "cfv",
                    "currentFlowVersionId": "3019200000GsdRR",
                    "showHeader": false,
                    "debugTrace": {
                        "entries": [
                            {
                                "html": "<span style=\"font-weight:bold;\">How the Interview Started<\/span><br>\n<span>Implementation User (005Mn000000jMik) started the flow interview.<\/span><br>\n<span>API Version for Running the Flow: 57<\/span><br>\n<\/p>\n"
                            },
                            {
                                "html": "<p>\n<span style=\"font-weight:bold;\">Transaction Committed<\/span><br>\n<span>Any records that the flow was ready to create, update, or delete were committed to the database.<\/span><br>\n<\/p>\n"
                            }
                        ]
                    },
                    "reactivityRules": [],
                    "showFooter": true,
                    "localActionName": null,
                    "localActionOutputs": null,
                    "featureGroupName": "flowclientruntime",
                    "navigationFeatureName": "navigation",
                    "pausedText": null,
                    "serializedEncodedState": "AAA[...]oGwgpM=",
                    "apiVersionRuntime": 57.0,
                    "localActionInputs": null,
                    "guid": "8001f3a2d0fae0f18970384f5c5118c001f5f1a-75b4",
                    "outputVariables": null,
                    "fields": [
                        {
                            "outputs": [
                                {
                                    "dataType": "STRING",
                                    "name": "acceptedFormats",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "allowMultiple",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "contentDocumentIds",
                                    "isCollection": true,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "contentVersionIds",
                                    "isCollection": true,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "icon",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "label",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "recordId",
                                    "isCollection": false,
                                    "objectType": null
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "uploadedFileNames",
                                    "isCollection": true,
                                    "objectType": null
                                }
                            ],
                            "isRequired": false,
                            "regionContainerType": null,
                            "extensionName": "c:fileUploadImproved",
                            "helpText": null,
                            "metadataValues": null,
                            "inputs": [
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "allowMultiple",
                                    "isCollection": false,
                                    "value": true,
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "cb_allowMultiple",
                                    "isCollection": false,
                                    "value": "CB_TRUE",
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "recordId",
                                    "isCollection": false,
                                    "value": "0019200000D4Ng5AAF",
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "renderExistingFiles",
                                    "isCollection": false,
                                    "value": true,
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "cb_renderExistingFiles",
                                    "isCollection": false,
                                    "value": "CB_TRUE",
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "renderFilesBelow",
                                    "isCollection": false,
                                    "value": true,
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "cb_renderFilesBelow",
                                    "isCollection": false,
                                    "value": "CB_TRUE",
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "BOOLEAN",
                                    "name": "visibleToAllUsers",
                                    "isCollection": false,
                                    "value": true,
                                    "objectType": null,
                                    "valueSources": []
                                },
                                {
                                    "dataType": "STRING",
                                    "name": "cb_visibleToAllUsers",
                                    "isCollection": false,
                                    "value": "CB_TRUE",
                                    "objectType": null,
                                    "valueSources": []
                                }
                            ],
                            "dataType": "LIGHTNING_COMPONENT_OUTPUT",
                            "errorMessage": null,
                            "isReactiveOnInit": false,
                            "label": null,
                            "extensionType": "lwc",
                            "name": "FileUploadOriginal",
                            "triggersUpdate": false,
                            "choices": null,
                            "contextMap": null,
                            "fields": [],
                            "value": null,
                            "fieldType": "COMPONENT_INSTANCE",
                            "visibilityRule": null,
                            "valueSources": null
                        },
                        {
                            "outputs": null,
                            "isRequired": false,
                            "regionContainerType": null,
                            "helpText": null,
                            "metadataValues": null,
                            "inputs": null,
                            "dataType": "BOOLEAN",
                            "errorMessage": "<p>Can&#39;t proceed!<\/p>",
                            "isReactiveOnInit": false,
                            "label": "Proceed",
                            "name": "Proceed",
                            "triggersUpdate": false,
                            "choices": null,
                            "contextMap": null,
                            "fields": [],
                            "value": false,
                            "fieldType": "INPUT",
                            "visibilityRule": null,
                            "valueSources": null
                        }
                    ],
                    "actions": [
                        {
                            "id": "FINISH",
                            "label": "Finish"
                        }
                    ],
                    "errors": null
                }
            },
            "error": []
        }
    ],
    "context": {
        "mode": "PROD",
        "app": "flowruntime:flowDebugLightningOut",
        "pathPrefix": "",
        "fwuid": "MDM0c01pMVUtd244bVVLc2VRYzQ2UWRkdk8xRWxIam5GeGw0LU1mRHRYQ3cyNDYuMTUuNS0zLjAuNA",
        "mlr": 1,
        "uad": 1,
        "descriptorUids": {
            "markup://c:fileUploadImproved": "gT6QmmZp2WQMBaqjxH8kSw"
        },
        "loaded": {
            "APPLICATION@markup://flowruntime:flowDebugLightningOut": "8x5eTo4iHlkTdJsxvrUC8w"
        },
        "globalValueProviders": [
            {
                "type": "$Global",
                "values": {
                    "eswConfigDeveloperName": {
                        "writable": true,
                        "defaultValue": ""
                    },
                    "isVoiceOver": {
                        "writable": true,
                        "defaultValue": false
                    },
                    "setupAppContextId": {
                        "writable": true,
                        "defaultValue": ""
                    },
                    "density": {
                        "writable": true,
                        "defaultValue": ""
                    },
                    "srcdoc": {
                        "writable": false,
                        "defaultValue": false
                    },
                    "appContextId": {
                        "writable": true,
                        "defaultValue": ""
                    },
                    "dynamicTypeSize": {
                        "writable": true,
                        "defaultValue": ""
                    }
                }
            },
            {
                "type": "$Label",
                "values": {
                    "LightningPrimitiveCellActions": {
                        "showActions": "Show actions"
                    }
                }
            }
        ],
        "enableAccessChecks": true,
        "dns": "c",
        "rns": [
            "omnistudio"
        ],
        "ls": 1,
        "lairn": [],
        "laerc": [],
        "lav": "59",
        "ln": 1,
        "csp": 1,
        "mna": {
            "lightning": "interop"
        },
        "lff": {
            "ENABLE_MIXED_SHADOW_MODE": false,
            "DISABLE_LIGHT_DOM_UNSCOPED_CSS": true,
            "ENABLE_LEGACY_SCOPE_TOKENS": false
        },
        "arse": 1,
        "acaf": 1,
        "services": [
            "markup://lightning:configProvider",
            "markup://force:salesforceScopedModuleResolver",
            "markup://force:ldsEngineCreator",
            "markup://instrumentation:locatorService"
        ]
    },
    "perfSummary": {
        "version": "core",
        "request": 59,
        "actions": {
            "72;a": {
                "total": 42,
                "db": 6
            }
        },
        "actionsTotal": 42,
        "overhead": 0
    }
}
@gbreavin
Copy link
Author

And so, the weekend comes and goes, and with its passing, the issue mysteriously disappears. We've not changed anything, Salesforce doesn't appear to have applied any patches over the weekend (still on Winter '24 Patch 14.8). We're still keeping an eye out it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant