Code Monkey home page Code Monkey logo

Comments (9)

futomi avatar futomi commented on July 18, 2024 1

@davidgatti Thank you for your advice. I'll try to check the code this weekend.

from node-onvif.

neonmura avatar neonmura commented on July 18, 2024 1

Error: Failed to initialize the device: Error: 400 Bad Request - Sender not Authorized
at services.device.getDeviceInformation (C:\Users\tutor\Desktop\RTSP-STREAM\node_modules\node-onvif\lib\modules\device.js:453:12)
at promise.then.catch (C:\Users\tutor\Desktop\RTSP-STREAM\node_modules\node-onvif\lib\modules\service-device.js:853:4)
at process._tickCallback (internal/process/next_tick.js:68:7)

Normally this happens when the clock in your client and camera differs more than 5 secs. I've noticed that in my camera, and solved it by either syncing both camera and client to same NTP or disable the function of "replay attack protection" in the axis camera.

from node-onvif.

futomi avatar futomi commented on July 18, 2024

I've not find the reason yet. I updated the node-onvif today. Though I'm not sure this issue is solved, try the latest version of the node-onvif.

from node-onvif.

mishitpatel avatar mishitpatel commented on July 18, 2024

@futomi I am able to discover the device properly but not able to connect it. It throws below error

Error: Failed to initialize the device: Error: 400 Bad Request - Sender not authorized
    at services.device.getCapabilities (/Users/Mishi/kiwi/repo/camera/node_modules/node-onvif/lib/modules/device.js:392:12)
    at promise.then.catch (/Users/Mishi/kiwi/repo/camera/node_modules/node-onvif/lib/modules/service-device.js:120:4)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

I have verified that username and password is correct. I am able to invoke ONVIF api through SOAP client with same username and password. I am using AXIS camera. Any idea what would be wrong ? Thanks in advance.

from node-onvif.

davidgatti avatar davidgatti commented on July 18, 2024

@futomi The issue is how your code authenticates to the camera. You should send the authentication in the header. You instead pass the user name and password in the body. It seams that you have this feature in http-auth.js but are using this module only in the .fetchSnapshot() function.

Is there a reason why you do it this way?

from node-onvif.

TutorJoes-Stanley avatar TutorJoes-Stanley commented on July 18, 2024

Error: Failed to initialize the device: Error: 400 Bad Request - Sender not Authorized
at services.device.getDeviceInformation (C:\Users\tutor\Desktop\RTSP-STREAM\node_modules\node-onvif\lib\modules\device.js:453:12)
at promise.then.catch (C:\Users\tutor\Desktop\RTSP-STREAM\node_modules\node-onvif\lib\modules\service-device.js:853:4)
at process._tickCallback (internal/process/next_tick.js:68:7)

from node-onvif.

TutorJoes-Stanley avatar TutorJoes-Stanley commented on July 18, 2024

I have same problem can any one help me

from node-onvif.

zainiazhr14 avatar zainiazhr14 commented on July 18, 2024

its because user not have permission for access

from node-onvif.

bradjin8 avatar bradjin8 commented on July 18, 2024

Error: Failed to initialize the device: Error: 400 Bad Request - Sender not authorized at /Volumes/DATA/Web/Onvif/node_modules/node-onvif/lib/modules/device.js:396:12 at /Volumes/DATA/Web/Onvif/node_modules/node-onvif/lib/modules/service-device.js:120:4 at processTicksAndRejections (node:internal/process/task_queues:96:5)
It has still the same issue.
@futomi

from node-onvif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.