-
Notifications
You must be signed in to change notification settings - Fork 19
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
ERROR: Response of login call to /login_sid.lua in initSID was not xml-formatted. #15
Comments
I have the same issue with a 7490 on 06.51. A shortened log below:
Note that there's a mixture of issues. Formatting error seems to be #12? There's also an indexerror that may not be critical. Versions:
|
As for the first warning message ( The second issue ( |
For the second Issue: The User has all the rights which are needed & the Fritzbox is configured like you have written. Is there a way to debug? |
hi @jens-maus, i try now the new Version (the new merged Version). Have the Same Problem :(
|
i try something (with my local FritzBox, not the remote one) I hope this helps you and @holzhannes |
is there a way how i can debug why it isn't working @jens-maus @holzhannes when i try it remote? i'm not the only one with this problem |
Thank you for the help. The VIP setting indeed was missing from my configuration (which I based on the readme, instead of the example). I expected the tool to survive removing unwanted options. Regarding the login error (this bug): I've tried all combinations of host names/ip addresses. When setting the
The same happens when I set it to the hostname of the box (
Note that the FTP upload before succeeds (I even see the image files in the NAS browser), so the login information should be correct. For what it's worth, the fritzbox is IPv6 enabled and resolves its name locally to an IPv6 as well:
|
i think it is a problem of the FRITZ!Box-API-PHP |
…x to assume remote access
The Problem is not solved :( |
@ArnaudFeld can you provide the log of the merged version. Does the DNS lookup for th3 given IP work at all? |
@ArnaudFeld yes, a detailed log would be great. In addition, please provide your config file so that we can see how you have configured carddav2fb. It might be that some special setting causes this. |
Where i found the log? |
The screen-output would be great. Especially after thr FTP upload is done. Beside thr actuallconfig might be helpful. |
Screen-Output:
Config.php: // CONFIG // DNS name of Fritz!Box or IP address // user name/password to access Fritz!Box // number of the internal phone book and its name // optional: write output to file instead of sending it to the Fritz!Box // optional: import only contacts of the given groups // group name of 'important' callers // base path of USB storage of Fritz!Box under which the path 'FRITZ\fonpix' could be found // multiple carddav adressbooks could be specified and will be merged together. // first // second |
Ok, so my workaround was focused on the case a IP address is given. As described: "When i try the "IP-Adresse" it fails. When i try "fritz.box" it works. " @jens-maus: I think there are three cases: |
Sorry my fault. @cmaoling IP address given => do you mean the local IP e.g.: 10.10.10.1 ? |
Not sure whether I can answer this in a generic way. I would assume you have a cloud-based owncloud and would like to update the phonebook @home. Correct? |
One additional thought. Have you tried to do a curl from the same server carddav2fb is running on, using the 10.10.10.1 IP adress? I used this to validate whether I have a basic issue. Or carddav2fb misbehaves. |
my owncloud is running on my webspace. 10.x is like 192.x or 172.x. (look rfc1918) |
The Problem is now only that when i try to go from carddav2fb (running on a raspberry pi) to the Fritzbox which i only can connect via dyndns. I hope it is now much clear whats my problem. Which port forward/firewall rules i should make? |
When i try a curl with https://fb.MYDOMAIN.de (the dyndns-adress of the FritzBox) then i get this answer: " <title>FRITZ!Box</title> <script type="text/javascript"> var g_HelpWin = null; </script> <noframes>Ihr Browser unterstützt keine XHTML-Frames. Sie können die FRITZ!Box Benutzeroberfläche aber trotzdem ohne Einschränkung nutzen. </noframes> " |
Does this problem still exit? |
The problem still exists.
The box is connect with my local network via Box-to-Box-VPN. If I specify the remote hoste name of the box as 'example.com' it doesn't work too. |
It would help me to better understand your setup, if you please share the output of the following two commands: Thanks |
(both boxes are reachable via dyndns
|
Thanks. Did you try to enter the hostname on Dyndns into your config rather than the IP? @jens-maus for me this remains to be caused by the fritzbox handling on incoming requests and the gateway setups in these VPN like setup. |
* 'master' of https://github.com/jens-maus/carddav2fb: (23 commits) we use !== for asXML() to make sure we really match with false fixed some more issues revealed by scrutinizer. Scrutinizer Auto-Fixes fixed some php code warnings revealed by scrutinizer-ci. Update README.md fixed the recently introduced warning/error outputs by adding PHP_EOL and a semicolon. This refs jens-maus#26. added some more warning/error output if a FTP-connection cannot be performed for some reasons. This refs jens-maus#26. fixed problem if the fonpix directory doesn't exist and is freshly created. This refs jens-maus#26. slightly reworked the photo data recognition/conversion routines to have some additional base64 encoding checks and to also check for the ['value'] key in the photo_data array or otherwise assume this might be an URL to point at a specific image. This refs jens-maus#24. yet an other spechial char: "ø" reworked routines constructing the phonebook names depending on the 'fullname_format' user setting. Now it should be more consistnt and generate valid names even for vcards not following a standard set. cleaned up processing output to look a bit nicer and also fixed $vcard_obj->n[0] warning not being set. cleanup: adapted code to common coding style rules (please use same coding styling in future!) cleanup: replaced all tabs by spaces (no tabs please, they are evil!) removed all the "init-images" stuff as it is not required anymore. improve vcard phone conversion upload image if nessesary only fix VIP handling fix minor typo Addresses jens-maus#15. Chaning given IP to hostname to avoid Fritzbox to assume remote access ...
This is what happens if I define the remote dyndns hostname:
|
Please update to the latest version available in git and retry. Then show the output here again. |
The picture upload has disappeared now but login error persists:
|
Well this output shows that your fritzbox doesn't support FTP transfers. However, I still don't understand what is causing the login problem during phonebook upload. |
I can't confirm this. I tried to login via FTP ohne both fritzboxes (192.168.10.1 and 192.168.2.1) with my laptop and both are working.
I could resolve. It happened because internet acces via ftp wasn't activated but the login_sid.lua error persists.
|
Ok, great that you solved your FTP problems. However, I still don't know why you are receiving the "initSID" problem. I really tried hard here to reproduce the problem but I am not able to get the same error here so I can't really debug the issue and would need someone else to debug this situation, I am afraid. |
It seems to depend on the used hostname. I had the same problem uploading the address book when I tried to use my internal hostname "router.mydomain.de". This name is is resolved by an internal nameserver. When i tried "fritz.box" everything works as expected. So maybe there is a clue in dealing with internal/external authentication? By the way: Thank you for that nice piece of work! |
Let me guess: You are all using HTTPS, right? I pinpointed this error to the setting of the certificate paths:
Of course, /etc/ssl/certs/192.168.178.1.pem doesn't exist, and that's what annoyed curl. If you are using a self-signed certificate, it makes sense you have to put it somewhere so the script can verify it (although I consider that a strange place, especially if you are running the script as a normal user), but if you have a "real" certificate signed by some trusted CA, you can simply patch away that additional path: diff --git a/lib/fritzbox_api_php/fritzbox_api.class.php b/lib/fritzbox_api_php/fritzbox_api.class.php
index 0e2720e..bf4296e 100644
--- a/lib/fritzbox_api_php/fritzbox_api.class.php
+++ b/lib/fritzbox_api_php/fritzbox_api.class.php
@@ -158,7 +158,6 @@ class fritzbox_api {
// set SSL-options and path to certificate
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
- curl_setopt($ch, CURLOPT_CAINFO, '/etc/ssl/certs/'.$ssl_cert_fritzbox.'.pem');
curl_setopt($ch, CURLOPT_CAPATH, '/etc/ssl/certs');
// support for pre FRITZ!OS 5.50 remote config Anyway, even if this isn't your problem, try applying this patch to enable verbose output from curl: diff --git a/lib/fritzbox_api_php/fritzbox_api.class.php b/lib/fritzbox_api_php/fritzbox_api.class.php
index 0e2720e..00c3d03 100644
--- a/lib/fritzbox_api_php/fritzbox_api.class.php
+++ b/lib/fritzbox_api_php/fritzbox_api.class.php
@@ -143,6 +143,7 @@ class fritzbox_api {
}
curl_setopt($ch, CURLOPT_URL, $this->config->getItem('fritzbox_url') . '/cgi-bin/webcm');
}
+ curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
if ( $this->config->getItem('enable_remote_config') == true ) |
For me the solution was to force login via plain http:
The problem is, that my fb does not listen on 443, so PHPs curl always returned false, which is of course not XML-formatted. |
Problem@jplitza already mentioned that it is might be a problem with TLS because the connection is closed because it is untrusted. I had the same issue
Solution 1You need to add the Certificate of your FRITZ!Box to the trusted Certs of the machine the carddav2fb is running on. how to?
Solution 2You could also get a valid Let’s Encrypt certificate on your FRITZ!Box by following this instruction and autoupdate it with this script. |
Used the actual Version from Github & get the following Error
FritzBox 7390
FritzOS: 06.30
With the same Script and a 7490 with 06.51 it works :/
The text was updated successfully, but these errors were encountered: