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

Facing issue with custom file upload feature in MS Copilot Studio #1044

Open
rishabhcopilot01 opened this issue Sep 24, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@rishabhcopilot01
Copy link

Describe the bug
Trying to build functionality to allow users to upload files using copilot studio chatbot. Currently, facing issues while trying to launch webpart on localhost. Exact error shared below : -

AssertionError [ERR_ASSERTION]: Handler [handler-0 on GET /api/azurestorage/uploadsastoken] is missing a third argument (the "next" callback) but is not an async function. Middleware handlers can be either async/await or callback-based.Callback-based (non-async) handlers should accept three arguments: (req, res, next). Async handler functions should accept maximum of 2 arguments: (req, res).

We are referencing the below Github Component to build this functionality : -
https://github.com/microsoft/CopilotStudioSamples/tree/master/BuildYourOwnCanvasSamples/2.location-and-file-uploading

Can you please assist with next steps.
Happy to get on a call and discuss.

Expected behavior
The file upload button should appear on copilot studio chatbot that helps in uploading file directly to azure blob storage.

Screenshots
Capture

@rishabhcopilot01 rishabhcopilot01 added the bug Something isn't working label Sep 24, 2024
@pete-willisSP
Copy link

I have the same issue

AssertionError [ERR_ASSERTION]: Handler [handler-0 on GET /api/azurestorage/uploadsastoken] is missing a third argument (the "next" callback) but is not an async function. Middleware handlers can be either async/await or callback-based.Callback-based (non-async) handlers should accept three arguments: (req, res, next). Async handler functions should accept maximum of 2 arguments: (req, res).

@NischalRam
Copy link

if you are getting this error:

AssertionError [ERR_ASSERTION]: Handler [handler-0 on GET /api/azurestorage/uploadsastoken] is missing a third argument (the "next" callback) but is not an async function. Middleware handlers can be either async/await or callback-based.Callback-based (non-async) handlers should accept three arguments: (req, res, next). Async handler functions should accept maximum of 2 arguments: (req, res).

try to decrease the npm version

install nvm

run

nvm install v14.21.3

then run

npm start

to download nvm

https://www.freecodecamp.org/news/nvm-for-windows-how-to-download-and-install-node-version-manager-in-windows-10/
https://github.com/coreybutler/nvm-windows/releases

worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants