Skip to content

Unhandled Rejection (Error): property 'url': url should be a string #36

@zeankundev

Description

@zeankundev

I was trying to run the project, but when I clicked to start a meeting, this happened.

Unhandled Rejection (Error): property 'url': url should be a string.
<StartButton
  224 |     disabled={!enableStartButton}
  225 |     onClick={() => {
> 226 |       createCall().then((url) => startJoiningCall(url));
      | ^  227 |     }}
  228 |   />
  229 | )}

Here is my api.js file.

async function createRoom() {

  const exp = Math.round(Date.now() / 1000) + 60 * 30;
  const options = {
    properties: {
      exp: exp,
    },
  };
  let response = await fetch(newRoomEndpoint, {
    method: "POST",
    body: JSON.stringify(options),
    mode: 'cors',
  }),
    room = await response.json();
  return room;

  // Comment out the above and uncomment the below, using your own URL
  return { url: "https://occursum.daily.co/occursum" };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions