nextcloud / calendar

πŸ“† Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
977 stars 240 forks source link

No calendar import #1898

Closed Valdnet closed 4 years ago

Valdnet commented 4 years ago

Steps to reproduce

  1. Download the calendar from the old version 1.7.1
  2. Open the calendar settings of version 2.0.1
  3. Import calendar copy file.
  4. No import action.

Expected behaviour

Import calendar from file.

Actual behaviour

No display of tasks from calendar import from file.

Calendar app

Calendar app version: (see apps admin page, e.g. 2.0.1) 2.0.1

Server configuration

Nextcloud Version: (see admin page, e.g. 17.0.2) 18.0.0

georgehrke commented 4 years ago

@Valdnet Can you please provide the entire issue template including logs?

Valdnet commented 4 years ago

@georgehrke There is no error in the log. I'm trying to load a copy of the calendar from an xxx.ics file made from the old version 1.7.1. Nothing happens when the backup file is selected via "Import calendar".

georgehrke commented 4 years ago

@Valdnet Please check the browser log. There must be something in there.

Valdnet commented 4 years ago

@georgehrke In Firefox 72.0.2 browser logs, when importing a file, only this:

Initial settings: 
Object { appVersion: "2.0.1", firstRun: true, showWeekends: true, showWeekNumbers: false, skipPopover: false, talkEnabled: false, timezone: "automatic" }
settings.js:87:2
[DEBUG] calendar: The calendar app is using version 2.2019c of the timezone database 
Object { app: "calendar", uid: "authenticated:xxx" }
ConsoleLogger.js:44:18
[DEBUG] calendar: Current user principal is /remote.php/dav/principals/users/xxx/ 
Object { app: "calendar", uid: "authenticated:xxx" }
ConsoleLogger.js:44:18
user changed files SettingsImportSection.vue:146
georgehrke commented 4 years ago

@Valdnet Can you still please fill the entire issue template?

This seems to be specific to some browser / os combination.

Valdnet commented 4 years ago

@georgehrke I am supplementing the missing data:

Client configuration

Browser: (e.g. Firefox 48) Firefox 72.0.2

Operating system: (e.g. Arch Linux) Win7 and Win10

Server configuration

Operating system: (e.g. Debian 8) Linux

Web server: (e.g. Apache, Nginx,...) Apache 2.4.39

Database: (e.g. MariaDB, SQLite or PostgreSQL) Mysql

PHP version: (e.g. 7.0.3) 7.2.14

Nextcloud Version: (see admin page, e.g. 17.0.2) 18.0.0

List of activated apps: Accessibility 1.4.0 Activity 2.11.0 Brute-force settings 1.5.0 Calendar 2.0.1 Collaborative tags 1.8.0 Comments 1.8.0 Deleted files 1.8.0 Federation 1.8.0 File sharing 1.10.1 First run wizard 2.7.0 Log Reader 2.3.0 Monitoring 1.8.0 Nextcloud announcements 1.7.0 Notes 3.1.1 Notifications 2.6.0 Password policy 1.8.0 PDF viewer 1.7.0 Photos 1.0.0 Privacy 1.2.0 Quick notes 0.2.2 Recommendations 0.6.0 Right click 0.15.2 Share by mail 1.8.0 Splash 1.1.4 Support 1.1.0 Tasks 0.11.3 Text 2.0.0 Theming 1.9.0 Update notification 1.8.0 Usage survey 1.6.0 Versions 1.11.0 Video player 1.7.0 Auditing / Logging 1.8.0 Default encryption module 2.6.0 External storage support 1.9.0 LDAP user and group backend 1.8.0

georgehrke commented 4 years ago

So you are saying you to go settings, click "Import calendars", select a file, but then you never see this dialog?

07A3E84C-DA01-4E87-97AF-2DC1BEDE50BC

Valdnet commented 4 years ago

Yes. This window does not appear for me.

meilon commented 4 years ago

Happens here, too. This is in the Chrome console:

calendar.js?v=c1e984bb-0:2 rmessage: "invalid ical body. component began but did not end"name: "ParserError"stack: " at new r (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:152314)↡ at Object.i [as parse] (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:152543)↡ at t.value (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:2176175)↡ at t.value (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:2174114)↡ at a.<anonymous> (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:2268903)↡ at c (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:1011658)↡ at Generator._invoke (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:1011411)↡ at Generator.forEach.e.<computed> [as next] (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:1012015)↡ at md (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:2266416)↡ at a (https://nextcloudhost/apps/calendar/js/calendar.js?v=c1e984bb-0:2:2266620)"__proto__: constructor: Ζ’ Error()name: "Error"message: ""toString: Ζ’ toString()arguments: (...)caller: (...)length: 0name: "toString"__proto__: Ζ’ ()[[Scopes]]: Scopes[0]__proto__: Objectconstructor: Ζ’ Object()__defineGetter__: Ζ’ __defineGetter__()__defineSetter__: Ζ’ __defineSetter__()hasOwnProperty: Ζ’ hasOwnProperty()__lookupGetter__: Ζ’ __lookupGetter__()__lookupSetter__: Ζ’ __lookupSetter__()isPrototypeOf: Ζ’ isPrototypeOf()propertyIsEnumerable: Ζ’ propertyIsEnumerable()toString: Ζ’ toString()valueOf: Ζ’ valueOf()toLocaleString: Ζ’ toLocaleString()get __proto__: Ζ’ __proto__()set __proto__: Ζ’ __proto__()

Nextcloud 17.0.2, Calendar 2.0.1, ics was exported from Google Calendar

georgehrke commented 4 years ago

@meilon Looking at the error message, it seems to be an invalid or incomplete ics.

Can you upload the file to https://icalendar.org/validator.html to check?

meilon commented 4 years ago

Thanks for the link, it mentioned something about CRLF in the first line, but it looked fine in Notepad++. I changed the file endings to Windows (it was Mac with CR), the validator was happy and the import worked. So adding an error dialog with a hint to the validator would be helpful, though the best solution would be if the importer wouldn't be so picky 😁. I know the specs require CRLF, but come on πŸ™ˆ

So worked for me, don't know if @Valdnet's issue is the same.

georgehrke commented 4 years ago

So adding an error dialog with a hint to the validator would be helpful

@meilon Absolute true about the better feedback, opened an issue for that: https://github.com/nextcloud/calendar/issues/1920

though the best solution would be if the importer wouldn't be so picky

Let's see what we can do about it, I opened an issue for now to keep track: https://github.com/georgehrke/calendar-js/issues/78

georgehrke commented 4 years ago

@Valdnet Can you please check the file you are trying to import with https://icalendar.org/validator.html as well?

Valdnet commented 4 years ago

@georgehrke I checked the file. Result below:

    File Size: 547 lines, 12339 bytes
    Number of events found: 34
    Number of timezones found: 1
    Success! No errors found.
diesl commented 4 years ago

I have the same problem. After selecting the file, nothing happens. The dialog is not shown (Firefox 72.0.2).

Nextcloud 18.0.0, Calendar 2.0.1, ics file exported from old owncloud installation. The ics file was validated successfully with https://icalendar.org/validator.html

Edit: After reading the comment below, I tried the same with Chrome, where the import worked fine!

However I noticed some other things (not strictly related to the main issue):

Pofilo commented 4 years ago

I have the same problem. Firefox 72.0.2, Nextcloud 17.0.3, Calendar 2.0.1.

Edit: With Google Chrome, the popup appears, but no events is visible in the calendar. ICS file used: https://raw.githubusercontent.com/AntoineAugusti/jours-feries-france-datagouv/master/jours_feries.ics (saved as .ics file).

LittleAlf commented 4 years ago

And here another one with exactly the same issue: No window after selecting ICS file and clicking ok. (ICS file checked with https://icalendar.org/validator.html)

Client configuration

Browser: (e.g. Firefox 48) Firefox 73.01 (64bit) and Microsoft Edge 44.18362.449.0

Operating system client: (e.g. Arch Linux) Win10 1903, 64bit

Operating system NC server: (e.g. Debian 8) Debian 9

Web server: (e.g. Apache, Nginx,...) Apache 2.4.25

Database: (e.g. MariaDB, SQLite or PostgreSQL) MariaDB

PHP version: (e.g. 7.0.3) PHP 7.2.27-5+0/~20200202.35+debian9/~1.gbp2925f8

Nextcloud Version: (see admin page, e.g. 17.0.2) 17.0.3

List of activated apps: Accessibility 1.3.0 Activity 2.10.1 Calendar 2.0.1 Collaborative tags 1.7.0 Comments 1.7.0 Contacts 3.1.8 Deleted files 1.7.0 Federation 1.7.0 File sharing 1.9.0 First run wizard 2.6.0 Gallery 18.4.0 Log Reader 2.2.0 Monitoring 1.7.0 Nextcloud announcements 1.6.0 Notes 3.1.5 Notifications 2.5.0 Password policy 1.7.0 PDF viewer 1.6.0 Preview Generator 2.2.0 Privacy 1.1.0 Recommendations 0.5.0 Right click 0.15.1 Share by mail 1.7.0 Support 1.0.1 Tasks 0.11.3 Text 1.1.1 Theming 1.8.0 Update notification 1.7.0 Usage survey 1.5.0 Versions 1.10.0 Video player 1.6.0 Viewer 1.2.0

LittleAlf commented 4 years ago

@tcitworld Thanks for the info. I looked into the solutions and tried them. Unfortunately, they do not work in my case! Accordingly, this issue should stay open.

georgehrke commented 4 years ago

@LittleAlf What line endings does the ics file have?

LittleAlf commented 4 years ago

@georgehrke CRLF They are exports of single calendar entries from Microsoft Outlook 2016. Shall I try it by converting them to LF?

LittleAlf commented 4 years ago

I just tried it, replacing all CRLF with LF: Nothing. The window to choose the calendar to import the entries does not pop up. No error message.

meilon commented 4 years ago

@LittleAlf anything in the console in your browser?

golfben commented 4 years ago

Same here. No error, no log entry no graphical change at all while trying to import several different ics files (checked them before import). Nextcloud 18.0.1 & Calendar 2.0.1 Client: Firefox 73.0.1

georgehrke commented 4 years ago

@golfben no log entry in the nextcloud.log or also nothing in the browser log?

golfben commented 4 years ago

@georgehrke no log entry in nextcloud.log. In my browser log it does only logs "user changed files", but no error either.

codywarmbo commented 4 years ago

Exact same issue, same Firefox version, same browser logs.

georgehrke commented 4 years ago

@Pofilo I'm not able to reproduce that in Firefox on macOS. F22E6608-AF07-4C6C-88F0-FDA6B2B8290A

I fear this issue is somehow related Windows.

golfben commented 4 years ago

Just tested it on another Nextcloud-installation (17.0.3) with the same browser and same calender app version. I get the same behavior here. @georgehrke This modal doesnt appear at all.

georgehrke commented 4 years ago

@golfben Are you using Firefox on Windows (7 or 10) as well?

georgehrke commented 4 years ago

I was able to reproduce this bug with the ics file provided by @Pofilo in a Firefox 62 on Windows. Looking into it now.

golfben commented 4 years ago

@georgehrke Yes, I am using Firefox 73.0.1 on Windows 10 - just tested it additionally on Microsoft Edge 44.18362.449.0 - doesnt work here either. Let me know if you need some more information or testing.

jochen35 commented 4 years ago

For me (NC 18.0.1, Windows 10 1909, Firefox 73.0.1, Edge, Export from NC 17.0.3) the import does not work either.

georgehrke commented 4 years ago

There is a pull-request to fix this bug in https://github.com/nextcloud/calendar/pull/2025

sreutter commented 4 years ago

It works again with 2.0.2 and firefox. thank you!

golfben commented 4 years ago

It works again with 2.0.2 and firefox. thank you!

Same here. I can confirm. Thanks, guys!

LittleAlf commented 4 years ago

It works again with 2.0.2 and firefox. thank you!

Same here. No problems importing anymore - Firefox 73.0.1 (64-bit).

Thank you very much!

Valdnet commented 4 years ago

Works properly. Thanks πŸ˜‰.