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

Uppy companion - Invalid client_id with error code 4700 #3741

Closed
tritran215 opened this issue May 16, 2022 · 8 comments
Closed

Uppy companion - Invalid client_id with error code 4700 #3741

tritran215 opened this issue May 16, 2022 · 8 comments
Assignees
Labels

Comments

@tritran215
Copy link

tritran215 commented May 16, 2022

Hi Uppy team.

I am one of so many guys who like your app.
Today, I'd like to configurate with zoom and companion standalone server.
Of course, the dashboard ui displays with local file browser and zoom icons.
But when I click zoom connect button, it displays error message.
{"status":false,"errorCode":4700,"errorMessage":"Invalid client_id: Xf7iC7oXQvyy_Cfak4NvsA","result":null}

I used to command companion --config ./uppycofig.json.

I used JWT key and secret key for setting.
My companion file(uppyconf.json) is here.

{
  "providerOptions": {
    "zoom": {
      "key": "key from zoom JWT",
      "secret": "secret key from zoom JWT"
    }
  },
  "server": {
    "host": "localhost:3020",
    "protocol": "http"
  },
  "filePath": "./download",
  "sendSelfEndpoint": "localhost:3020",
  "secret": "mysecret",
  "uploadUrls": ["https://myuploadurl.com", "http://myuploadurl2.com"],
  "debug": true
}

I am working on next project.
Here is code for uppy setting.

import React from 'react';

import Box from '@mui/material/Box';

import OrgUppy from '@uppy/core';
import '@uppy/core/dist/style.css';

import Dashboard from '@uppy/dashboard';
import '@uppy/dashboard/dist/style.css';

import {Dashboard as Container} from '@uppy/react';
import Tus from '@uppy/tus';
import Zoom from '@uppy/zoom';

import {UppyProps} from './Uppy.types';

const uppy = new OrgUppy({
  meta: {type: 'avatar'},
  restrictions: {maxNumberOfFiles: 1},
  autoProceed: true,
});

uppy
  .use(Dashboard, {
    trigger: '#Uppy',
    showProgressDetails: true,
  })
  .use(Zoom, {
    target: Dashboard,
    companionUrl: 'http://localhost:3020/',
  })
  .use(Tus, {endpoint: 'https://tusd.tusdemo.net/files/'})
  .on('complete', (result) => {
    console.log('Upload result:', result);
  });

const Uppy = (props: UppyProps) => {
  return (
    <Box data-testid="Uppy">
      <Container uppy={uppy} {...props} />
    </Box>
  );
};

export default Uppy;

Here is my environment.

  • OS: Windows 10
  • Editor: Visual studio code
  • "dependencies": {
    "@nrwl/next": "14.1.5",
    "@uppy/companion": "^3.5.2",
    "@uppy/core": "^2.2.0",
    "@uppy/zoom": "^1.1.0",
    "core-js": "^3.6.5",
    "next": "12.1.5",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-is": "18.1.0",
    "regenerator-runtime": "0.13.7",
    "styled-components": "5.3.5",
    "tslib": "^2.3.0"
    },

My Question is
Which kind of key and secret should I use for zoom companion?
I tried with JWT and SDK. but both of them got error messages.

Hope your good advise soon!

Thanks

@Murderlon
Copy link
Member

Hi, couple of things going wrong here:

@tritran215
Copy link
Author

tritran215 commented May 17, 2022

Hi @Murderlon
Thanks for your details reply.

I updated my code by following above steps.
`import React from 'react';

import Box from '@mui/material/Box';

import OrgUppy from '@uppy/core';
import '@uppy/core/dist/style.css';

import '@uppy/dashboard/dist/style.css';

import {Dashboard, useUppy} from '@uppy/react';
import Tus from '@uppy/tus';
import Zoom from '@uppy/zoom';

import {UppyProps} from './Uppy.types';

const Uppy = (props: UppyProps) => {
const uppy = useUppy(() => {
return new OrgUppy({
meta: {type: 'avatar'},
restrictions: {maxNumberOfFiles: 1},
autoProceed: true,
})
.use(Tus, {endpoint: 'https://tusd.tusdemo.net/files'})
.use(Zoom, {companionUrl: 'https://companion.uppy.io'});
});

return (

<Dashboard uppy={uppy} {...props} plugins={['Zoom']} />

);
};

export default Uppy;`

It works to render same UI but still getting error when I click connect to zoom buttonlike {"status":false,"errorCode":4700,"errorMessage":"Invalid client_id: ","result":null}.

Here is the code for companion's configure.json in server side.
{ "providerOptions": { "zoom": { "key": "zzKXNQTSDavJZeq3pxDcg", "secret": "oauth secret key" } }, "server": { "host": "localhost:3020", "protocol": "http" }, "filePath": "./download", "sendSelfEndpoint": "localhost:3020", "secret": "mysecret", "uploadUrls": ["https://myuploadurl.com", "http://myuploadurl2.com"], "debug": true }

@tritran215
Copy link
Author

@Murderlon
I confiugred oAuth app called uppyCloudServer in my zoom account what I already added in the uppy component.
When I test it there, It shows me confirming page and redirected to the purpose link(testd.com).
But it doesn't work correctly what I expected in the uppy component.

Here is the screenshots.
image
image
image
image

Can you check it for me?

  • Why uppy zoom connection doesn't work with zoom oauth key and sdk like from zoom account setting page?
  • For the development, can I set add localhost domain to rediect url and whitelist ?

Best.

@Murderlon
Copy link
Member

I have never used the Zoom plugin. Perhaps @arturi knows more about it (together with #3684).

@tritran215
Copy link
Author

@Murderlon
I have another question.
I know uppy doesn't support windows, but I'd like to know if there is any way to run companion command in the vs code bash or terminal.
Actually, I have been run cmd companion --config ./uppyconf.json but I can't run again after restarting the vscode.
I am sure it is possible to run it windows.

Hope your good advise.
Thanks.

@Murderlon
Copy link
Member

I'm not sure about windows but you should definitely be able to run it with WSL.

@tritran215
Copy link
Author

I've already checked it with WSL2 but still not worked.

@Murderlon
Copy link
Member

Closing this but feel free to continue the discussion

@Murderlon Murderlon closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants