Skip to content

new CosmosClient throws ERR_INVALID_URL #44

@xuxife

Description

@xuxife

Hi, I'm using my fresh deployed cosmos db URI in a format of "https://<my-cosmos>.documents.azure.com:443/", while the following runtime error is thrown.
I check the @azure/cosmos document, turns out the URI format is correct.

Do we have any clue about the cause or have any workaround?

image
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at ChatMenu (./features/chat/chat-menu/chat-menu.tsx:19:138)
    at stringify (<anonymous>)
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at Home (./app/chat/page.tsx:18:138)
    at async Promise.all (index 0)
    at async Promise.all (index 0)
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at ChatMenu (./features/chat/chat-menu/chat-menu.tsx:19:138)
    at stringify (<anonymous>)
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at ChatMenu (./features/chat/chat-menu/chat-menu.tsx:19:138)
    at stringify (<anonymous>)
digest: "304417822"
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at Home (./app/chat/page.tsx:18:138)
    at async Promise.all (index 0)
    at async Promise.all (index 0)
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at ChatMenu (./features/chat/chat-menu/chat-menu.tsx:19:138)
    at stringify (<anonymous>)

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