carlos22 / carddav2fb

:notebook: A command-line PHP script allowing to import CardDAV-based VCards (e.g. from 'owncloud') to a phonebook in a AVM FRITZ!Box
The Unlicense
86 stars 68 forks source link

FTP-Upload failed since FritzOS 7.01 #32

Closed grimSBZ closed 5 years ago

grimSBZ commented 5 years ago

The script worked great until I updated my FritzBox to FritzOS 7. Besides the fact that the Fritz-user now has to have "access from the internet" to establish the FTP-connection the upload of the phonebook itself failed.

Upload data to FRITZ!Box @ fritz.box
 FTP-Upload '4821f.jpg'... already exists.
  Uploading Phonebook XML to fritz.box
  ERROR: ERROR: Login failed with an unknown response.

I am using Debian 9.8 as the system that is running the script. My ISP is 1and1 so the FritzBox maybe has a slightly modified firmware but i dont know how much alteration they really do.

Has someone any suggestions on how to fix this or how to get more information from the message Login failed with an unknown response.?

Thanks!

wrohdewald commented 5 years ago

I have Fritz 07.02, and I had to enable ftp access, see below. But this may not be your problem because you get FTP-Upload '4821f.jpg'... already exists.

Anyway try to use any ftp client and see if that one can access the box.

And anyway an error message "unknown response" is a bug in itself, IMHO. That unknown response should be included in the error message.

Heimnetz / Speicher (NAS), enable "Zugriff über FTP aktiv"

Something like

Home network / Storage (NAS), enable "Access over FTP active"

grimSBZ commented 5 years ago

There seems to be a problem with IPv6. I configured as fritzbox_ip and fritzbox_ip_ftp the corresponding IPV4 address instead of the hostname. Now I am getting the error mentioned in #18

ERROR: Response of initialization call /login_sid.lua in initSID was not xml-formatted.

This is could be the failing ssl validation. I applied the fix mentioned in 8e8467d546dfc06074cf17740b20ff2f907f7c0e but no success. Even with curl_setopt($ch, CURLOPT_VERBOSE, TRUE); there is no more information to go on.

At least the IPv6-issue seems to be fixed since FRITZ!OS 7.08-64610/64611 beta-version (https://avm.de/fritz-labor/fritz-labor-fuer-fritzbox-7590-und-7490/neuesverbesserungen/).

Behoben - lokaler FTP-Zugriff via IPv6 scheitert bei Benutzern ohne Internet-Rechte

For my device the stable version is still 7.01.

grimSBZ commented 5 years ago

worked since i updated FritzOS to 7.10 and switched to andig/carddav2fb.

Maybe the main reason was that I changed the fb-login-settings to Anmeldung mit FRITZ!Box-Benutzernamen und Kennwort instead of Anmeldung mit dem FRITZ!Box-Kennwort.