Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

UnhandledPromiseRejectionWarning: Unauthorized Access. Request is not authorized #1968

@Basavarajsk

Description

@Basavarajsk

Version

The version of the Emulator is 4.4.2

Describe the bug

This is the first time I download the source code of my bot and use the emulator to connect it.
When I downloaded source I have pressed "Yes" when asking whether including app settings in the zip file.
I just input the my bot URL and press "connect", and then I can see following error in my bot console:
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:8776) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
warning.js:18
(node:8776) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
warning.js:18
BotFrameworkAdapter.processActivity(): 401 ERROR - Error: Unauthorized Access. Request is not authorized
botFrameworkAdapter.ts:614
(node:8776) UnhandledPromiseRejectionWarning: Error: Error: Unauthorized Access. Request is not authorized
warning.js:18
at BotFrameworkAdapter.processActivity (c:\SVN_Repo\BotRepository\OCC\OCCPortalBot-Dev-src\node_modules\botbuilder\src\botFrameworkAdapter.ts:615:19)
at
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:8776) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)

To Reproduce

Steps to reproduce the behavior:

start my local bot (based on node.js):
npm start
start the emulator and do following actions:
a. press "File"-> "Open Bot"
b. Enter a Bot URL of http://localhost:3978/api/messages
c. press "Connect"
d go to the window where I started my local bot and I can see the above error message.
e if I type a message in the emulator, I can not see the response from the bot.

The following is the setting of the emulator:
image

Expected behavior

The local bot should not show error message when emulator connects to it.

Screenshots

image

Additional context

Bot framework SDK version is 4.2
$ node -v
v8.11.2
$ npm -v
5.6.0

[bug]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bot Servicesequired for internal Azure reporting. Do not delete. Do not change color.BugYour classic code defectcustomer-replied-toRequired for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions