-
Notifications
You must be signed in to change notification settings - Fork 198
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
Failed to initialize the device #22
Comments
I've not find the reason yet. I updated the |
@futomi I am able to discover the device properly but not able to connect it. It throws below error
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. |
@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 Is there a reason why you do it this way? |
@davidgatti Thank you for your advice. I'll try to check the code this weekend. |
Error: Failed to initialize the device: Error: 400 Bad Request - Sender not Authorized |
I have same problem can any one help me |
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. |
its because user not have permission for access |
|
Hello,
I got this:
Failed to initialize the device: Error: Networ Error: socket hang up at services.media.getProfiles (node_modules\node-onvif\lib\modules\device.js:464:12) at promise.then.catch (node_modules\node-onvif\lib\modules\service-media.js:392:4) at<anonymous>
I try to launch example of Create OnvifDevice object:
'const onvif = require('node-onvif');
// Create an OnvifDevice object
let device = new onvif.OnvifDevice({
xaddr: 'http://IP:PORT/onvif/device_service',
user : 'xxxx',
pass : 'xxxx'
});
// Initialize the OnvifDevice object
device.init().then((info) => {
// Show the detailed information of the device.
console.log(JSON.stringify(info, null, ' '));
}).catch((error) => {
console.error(error);
});'
It gives me this error when I try to launch it on Windows Server 2012, but when I launch it on my pc (Win 10), it works fine. I tried to turn off firewall, make in and outbound rules, with no success. The camera has public is behind router and has forwarded ports.
Any help is appreciated.
EDIT So it turned out, that it doesn't work on my local pc either. It was connecting to my LAN IP cam, even though I typed IP address of public IP camera.
EDIT2 It is getting stranger, and stranger. When I my local IP cam connected to router, the app can connect both to local, and public IP cam (I can tell by Hardware ID), but when I disconnect local IP camera, it suddenly can't connect to public camera. When I try snapshot app and type public IP it gets snapshot...from local IP camera.
The text was updated successfully, but these errors were encountered: