add_2_calendar icon indicating copy to clipboard operation
add_2_calendar copied to clipboard

2.2.5 Add Calendar Failed at First time after Grant Permission

Open JmyW opened this issue 1 year ago • 23 comments

I use 2.2.5 on iOS. That can compile and execute on iPhone. If the app is new installed, the permission grant dialog will be showed up. When you grant it, the event page is showed up. Tap "Add", it appears "Error".

I roll back to 2.2.4, it works good at same scenario.

However, looks like the 2.2.5 got something wrong when add the event in calendar after grant permission.

<Note> my iPhone 15 is installed with 16.7 iOS.

JmyW avatar Oct 14 '23 08:10 JmyW

Tried more times, confirm this is an issue. Please kindly check the 2.2.5. The 2.2.4 has no issue.

@diegogarciar @Maleandr @ja2375

JmyW avatar Oct 14 '23 13:10 JmyW

Can you test with the example app?

diegog-sf avatar Oct 14 '23 15:10 diegog-sf

Good point, will let you know asap.

JmyW avatar Oct 15 '23 02:10 JmyW

Same failure by example app.

I recorded a video for you to easily see the situation. Please take look: [https://www.dropbox.com/scl/fi/bidsjsz6rrad7tc91bj4p/add2calendarVideo.mp4?rlkey=yt3e7c5qaq1fq7pzib8nj57lq&dl=0] It's kept failed after allow the permission until discard changes, then it works at the next time.

The log output is: (lldb) 2023-10-15 11:22:33.579653+0800 Runner[13647:1097877] [VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(37)] Using the Impeller rendering backend. Warning: Unable to create restoration in progress marker file fopen failed for data file: errno = 2 (No such file or directory) Errors found! Invalidating cache... Debug service listening on ws://127.0.0.1:53170/c-93_2nMW6g=/ws Syncing files to device jPhone... [EventKit] Error getting defaultTimedAlarmOffset: Error Domain=EKCADErrorDomain Code=1013 "Access denied" UserInfo={NSLocalizedDescription=Access denied} [Warning] Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a table view cell's content view. We're considering the collapse unintentional and using standard height instead. Cell: <EKDateTimeCell: 0x11a872000; baseClass = UITableViewCell; frame = (0 198.667; 361 22.6738); autoresize = W; gestureRecognizers = <NSArray: 0x2825529d0>; layer = <CALayer: 0x282b52800>> [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [eventStoreEditor] Failed to save event: (null) [EventKitUI] Calendar: unable to save: (null) [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [eventStoreEditor] Failed to save event: (null) [EventKitUI] Calendar: unable to save: (null) [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [eventStoreEditor] Failed to save event: (null) [EventKitUI] Calendar: unable to save: (null) [xpc] XPC connection was invalidated [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [xpc] XPC connection was invalidated [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [xpc] XPC connection was invalidated Application finished.

JmyW avatar Oct 15 '23 03:10 JmyW

@diegogarciar Hi Diegogarciar, The 2.2.5 you released got this issue, could you kindly check and fix it? Thanks.

JmyW avatar Oct 17 '23 02:10 JmyW

@diegog-sf Per your request, I tested the example code and got same failed result. Any advice?

JmyW avatar Oct 18 '23 01:10 JmyW

I'll see whats going on during the week, please revert to previous version for now

diegog-sf avatar Oct 18 '23 01:10 diegog-sf

Thank you so much!

JmyW avatar Oct 18 '23 01:10 JmyW

@diegog-sf Any progress? thanks!

JmyW avatar Oct 24 '23 09:10 JmyW

Hello, I just tested with iOS 15 and its working fine on 3.0.0, can you test if this new version solves your issue?

diegogarciar avatar Oct 24 '23 15:10 diegogarciar

I just tested the 3.0.1. The result is the same, failed at first time. Not improve. :(

JmyW avatar Oct 25 '23 02:10 JmyW

So I remember I had this issue in the past, but it was because the calendar was not previously set on my iOS simulator, but for your real device it could be a different thing, I don't have a solution for it right now, so I'll keep an eye on it.

diegogarciar avatar Oct 25 '23 14:10 diegogarciar

Before test, I would uninstall first on my iPhone. Then it's 100% reproduced. My iPhone is v16.7, guessingly your iPhone15 is 17.0.0. Not sure whether it's related to iOS version although I don't think so since it's good if I roll back to 2.2.4.

However, Yes! please keep watching this.

And let's see if someone else will report the same issue here.

JmyW avatar Oct 26 '23 02:10 JmyW

2.2.24 does not work on ios 17. we need a version >3.0.1 which fixes this

adrianvintu avatar Oct 27 '23 13:10 adrianvintu

Is there any news? It's broken for a few weeks already...

adrianvintu avatar Nov 16 '23 16:11 adrianvintu

No news, open for help! if you find a workaround please submit a PR

diegogarciar avatar Nov 17 '23 04:11 diegogarciar

I see the https://pub.dev/packages/device_calendar have updated their package. Does their implementation work? Can you get some inspiration from them?

adrianvintu avatar Nov 17 '23 07:11 adrianvintu

device calendar does not add the calendar from a UI interface, so their implementation is totally different

diegogarciar avatar Nov 23 '23 14:11 diegogarciar

Oh, thank you!

adrianvintu avatar Nov 23 '23 15:11 adrianvintu

any update on this even 3.0.1 not work with iOS version 17.1.2 or higher

AhmedKhattab95 avatar Dec 26 '23 15:12 AhmedKhattab95

In the project where I use the plugin I also use permission_handler plugin, so checking and requesting calendar permission with that plugin. But event addition works fine first or other times.

Also, don't forget that since iOS 17 there were changes in calendar permissions work and now apps also need to provide proper keys in Info.plist for the updated permissions approach.

Take a look here (especially note the Important orange block): https://developer.apple.com/documentation/eventkit/accessing_the_event_store#2975207

So I believe that the author of the issue probably has not all entries in Info.plist file.

vbuberen avatar Jan 31 '24 14:01 vbuberen