Repository navigation
vCard import broken: window.localStorage is null #433
Description
This is probably a bug on the frontend, see console log at the bottom.
Steps to reproduce
- Upload a .vcf
- Watch spinner forever
Expected behaviour
Contacts are imported.
Actual behaviour
A javascript exception
Server configuration
Operating system: CentOS on a shell hoster (uberspace.de)
Web server: dunno
Database: postgres 9.3
PHP version: 7.0
Nextcloud version: 12.0.3
Contacts version: 2.0.1
Updated from an older Nextcloud or fresh install: fresh install
Signing status:
no errors have been found
List of activated apps:
Enabled:
- activity: 2.5.2
- comments: 1.2.0
- contacts: 2.0.1
- dav: 1.3.0
- federatedfilesharing: 1.2.0
- federation: 1.2.0
- files: 1.7.2
- files_pdfviewer: 1.1.1
- files_sharing: 1.4.0
- files_texteditor: 2.4.1
- files_trashbin: 1.2.0
- files_versions: 1.5.0
- files_videoplayer: 1.1.0
- firstrunwizard: 2.1
- gallery: 17.0.0
- logreader: 2.0.0
- lookup_server_connector: 1.0.0
- news: 11.0.5
- nextcloud_announcements: 1.1
- notifications: 2.0.0
- oauth2: 1.0.5
- password_policy: 1.2.2
- provisioning_api: 1.2.0
- serverinfo: 1.2.0
- sharebymail: 1.2.0
- survey_client: 1.0.0
- systemtags: 1.2.0
- theming: 1.3.0
- twofactor_backupcodes: 1.1.1
- unsplash: 1.0.5
- updatenotification: 1.2.0
- workflowengine: 1.2.0
Disabled:
- admin_audit
- encryption
- files_external
- user_external
- user_ldap
Nextcloud configuration:
{
"system": {
"log_type": "file",
"logtimezone": "\/Europe\/London",
"logfile": "\/home\/me\/tmp\/nextcloud.log",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"me.pictor.uberspace.de"
],
"datadirectory": "\/var\/www\/virtual\/me\/html\/nextcloud\/data",
"overwrite.cli.url": "http:\/\/localhost",
"dbtype": "pgsql",
"version": "12.0.3.3",
"dbname": "nextcloud",
"dbhost": "\/home\/me\/tmp",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "oc4bsvolsm6i",
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "\/home\/me\/.redis\/sock",
"port": 0,
"dbindex": 0,
"password": "***REMOVED SENSITIVE VALUE***",
"timeout": 1.5
},
"filelocking.enabled": true,
"memcache.locking": "\\OC\\Memcache\\Redis",
"htaccess.RewriteBase": "\/nextcloud\/",
"maintenance": false
}
}
Are you using external storage, if yes which one: none
Are you using encryption: no
Are you using an external user-backend, if yes which one: none
Client configuration
Browser: both FF 56 and current Chrome
Operating system: Ubuntu 17.04
Logs
Web server error log
don't know where and I bet I don't have access
Nextcloud log (data/nextcloud.log)
entries are old and unrelated
Browser log
angular.js?v=3f38eefcee766e956d4f0af8bb974918-0:13920 Error: [$rootScope:inprog] $apply already in progress
Activity
Henni commentedon Nov 9, 2017
Could you give us the complete stack trace of the browser log?
It should contain more details about where in our could this happens.
whathome commentedon Nov 12, 2017
I am having the same issue. Fresh install. Here is the browser trace.
whathome commentedon Nov 12, 2017
Hmm, it's not actually the importer -- it's the sort order check that's causing it.
In 'SortByService' in script.js its checking for defaultOrder from window.localStorage and it's null. I'm entirely unfamiliar with the project so I'm not sure of the ramifications, but if I put an null check around the block like so:
then the page loads properly. I'm not sure if that's the proper elegant fix, but it works for me.
Henni commentedon Nov 12, 2017
@weslimitless which browser (and version) are you using?
whathome commentedon Nov 12, 2017
Firefox 56.0.2, OSX
memen45 commentedon Nov 22, 2017
I am having the same issue with importing a .vcf file (vcf with single entry does work). The left panel keeps spinning and opening a new tab does not show any contacts being added.
Nextcloud server 12.03
skjnldsv commentedon Nov 23, 2017
@memen45 what contact version? Please add your logs. :)
memen45 commentedon Nov 23, 2017
skjnldsv commentedon Nov 23, 2017
Mostly the browser log then. :)
memen45 commentedon Nov 23, 2017
Okay, this is the output from console (I am using Microsoft Edge):
Sorry for the dutch warning in the beginning, it says "Resource caused a conflict"
Edit: It is still spinning, but following line also appeared:
paraqles commentedon Nov 27, 2017
Hi,
I seem to have a similar problem. Not quite sure it it is the same cause.
I tested it with firefox, chrome and safari. All of them show the same error.
And there is no request to the server, seems it breaks on reading the vcf file.
The VCF file is exported on android 7.1.2 stock contacts app.
The Browser Console says:
General server configuration
Operating system: FreeBSD journee 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64
Web server: nginx/1.12.1 (fpm-fcgi)
Database: pgsql PostgreSQL 9.5.10 on amd64-portbld-freebsd11.0, compiled by FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0), 64-bit
PHP version: 7.1.10
PHP-modules loaded
Nextcloud configuration
Nextcloud version: 12.0.3 - 12.0.3.3
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: zip-file
Are you using external storage, if yes which one: files_external is disabled
Are you using encryption: no
Are you using an external user-backend, if yes which one: NO
(LDAP/ActiveDirectory/Webdav/...)
Signing status
Enabled apps
Disabled apps
Content of config/config.php
Client configuration
Browser:
Mozilla Firefox 57
Safari 11.0.1
Chrome 62.0.3202.89
Operating system: macOS 10.12.6
Logs
Web server error log
Nextcloud log (data/nextcloud.log)
Browser log
skjnldsv commentedon Nov 29, 2017
@irgendwie didn't we had this bug fixed earlier on? :)
ispringle commentedon Dec 2, 2017
Don't have logs at the moment, I'm on my phone. I am getting a similar issue. I was able to get past the spinning by opening the vcf file and changing version number to 3.0.
It sort of works, gets past the spinning, but it took 30 minutes to upload a single contact and never imported more than the first contact. Might want to check the vcf version, Contacts won't upload any version 2.X vcf files.
20 remaining items
laurent22 commentedon Apr 18, 2018
Probably VCF 2.1 support is simply broken, but not dropped since SabreDAV supports it.
nd- commentedon May 21, 2018
Same problem as @laurent22, javascript error, unable to import contacts.
Tested on FF 60 and Chrome 66, same javascript errors in the console.
kangaroo72 commentedon May 22, 2018
I also confirm on latest FF & Chrome Browsers ...
nd- commentedon May 22, 2018
I just edited my vcf files, find and replace "VERSION:2.1" with "VERSION:3.0", and it works now.
But now i have some carbook properties with "INTERNET=:" or "CELL=:"
I tried a mysql replace() in the oc_cards_properties table, but no luck, it seems these properties are stored in oc_cards, in the carddata BLOB.
In my vcf files, i have properties like "email;internet:[email protected]", is it an issue with 2.1/3.0 vcf format ?
elman22 commentedon May 22, 2018
Replacing header VERSION might work for some cases, but there are changes between 3.0 and 2.1 and parser does things slightly differently. Therefore you cannot expect to work this 100%. See for example https://pear.php.net/manual/en/package.fileformats.contact-vcard-build.intro.php
Proper 2.1 support would be welcomed.
ja573 commentedon Jun 12, 2018
Photos can be imported by being explicit about the media type and specifying encoding as "b":
replace
PHOTO;ENCODING=BASE64;JPEG:withPHOTO;TYPE=JPEG;ENCODING=b:(the encoded picture remains the same)[-]vCard import broken[/-][+]vCard import broken: window.localStorage is null[/+]