raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.45k stars 3.14k forks source link

[Apple Reminders Beta] Something went wrong "My Reminders" #8955

Closed teziovsky closed 1 year ago

teziovsky commented 1 year ago

Extension

https://www.raycast.com/raycast/reminders

Description

Error:

RangeError: Invalid time value

nM:my-reminders.tsx:11:53

---
 8: 
 9: export default function Command() {
10:   const { displayCompletionDate } = getPreferenceValues<Preferences.MyReminders>();
11:   const [listId, setListId] = useCachedState<string>("all");
12: 
13:   const { data, isLoading, mutate } = useData();
14: 
---

Fr:index.js:9:2490
    at ray-navigation-stack
Vo:index.js:9:2088

Steps To Reproduce

  1. Update extension
  2. Open "My Reminders"

Current Behaviour

Reminders are not showing

reminders 2023-10-25 at 12 55 26

raycastbot commented 1 year ago

We could not find the extension related to this issue. Please update the issue with the correct link to the extension.

thomaslombart commented 1 year ago

Would you mind sharing the date time of your reminders?

teziovsky commented 1 year ago
Screenshot 2023-10-25 at 12 57 18 Screenshot 2023-10-25 at 12 57 37
thomaslombart commented 1 year ago

I shipped a fix. Do you still have the issue?

teziovsky commented 1 year ago
RangeError: Invalid time value

nM:my-reminders.tsx:11:53

---
 8: 
 9: export default function Command() {
10:   const { displayCompletionDate } = getPreferenceValues<Preferences.MyReminders>();
11:   const [listId, setListId] = useCachedState<string>("all");
12: 
13:   const { data, isLoading, mutate } = useData();
14: 
---

Fr:index.js:9:2490
    at ray-navigation-stack
Vo:index.js:9:2088

Hmmm nothing changed. When I cleared Clear Local Storage & Cache. The extension opened properly, but when I changed Group By to Due Date it crashed again with that error 🤔

thomaslombart commented 1 year ago

Ah, so it may be related to how the due dates are parsed and organized into sections. I tried replicating your reminders due dates but couldn't make it crash. Let's try one more time.

thomaslombart commented 1 year ago

Are you able to launch the extension locally? If so, could you add a console.log here and let me know if you get any value?

teziovsky commented 1 year ago

Yes of course, let me check 😎

teziovsky commented 1 year ago

I have that error during npm run dev

build failed (src/api.ts:1:22 import reminders from "swift:../swift/reminders";): failed to parse the swift package: exit status 1

Do you know how to solve it? 🤔

thomaslombart commented 1 year ago

Which version of macOS and Swift are you using?

teziovsky commented 1 year ago

MacOS

sw_vers
ProductName:        macOS
ProductVersion:     14.1
BuildVersion:       23B74

Swift

swift -version
Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
Target: x86_64-apple-darwin23.1.0
teziovsky commented 1 year ago

All I need to do in the project dir is npm run dev, right?

thomaslombart commented 1 year ago

Assuming you run npm install beforehand, yes npm run dev is the only command you need to run.

teziovsky commented 1 year ago
npm install && npm run dev

up to date, audited 254 packages in 1s

98 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> dev
> ray develop

info  -  entry points [src/my-reminders.tsx src/create-reminder.tsx src/menu-bar.tsx src/quick-add-reminder.tsx]
error -  compiling swift package
build failed (src/api.ts:1:22 import reminders from "swift:../swift/reminders";): failed to parse the swift package: exit status 1

Raycast 2023-10-30 at 10 15 28

thomaslombart commented 1 year ago

I assume you're using the latest Raycast version as well? What version do you also have when running ray version?

teziovsky commented 1 year ago
bunx ray version
1.60.1
thomaslombart commented 1 year ago

And using Xcode 15+? 😅

teziovsky commented 1 year ago

Ok, there is a problem I guess 🙈

teziovsky commented 1 year ago
xcodebuild -version
Xcode 15.0.1
Build version 15A507
npm run dev

> dev
> ray develop

info  -  entry points [src/my-reminders.tsx src/create-reminder.tsx src/menu-bar.tsx src/quick-add-reminder.tsx]
error -  compiling swift package
build failed (src/api.ts:1:22 import reminders from "swift:../swift/reminders";): failed to parse the swift package: exit status 69

It's not a problem 🤔 🤷

thomaslombart commented 1 year ago

I'll check in with the team and see what's happening here. Are you still getting the bug as of today even after clearing the cache in case the extension didn't update after the fix?

teziovsky commented 1 year ago

Hmm, all extensions are up to date, raycast is up to date, My Reminders cache is deleted, and still there is an error:

RangeError: Invalid time value

nM:my-reminders.tsx:11:53

---
 8: 
 9: export default function Command() {
10:   const { displayCompletionDate } = getPreferenceValues<Preferences.MyReminders>();
11:   const [listId, setListId] = useCachedState<string>("all");
12: 
13:   const { data, isLoading, mutate } = useData();
14: 
---

Fr:index.js:9:2490
    at ray-navigation-stack
Vo:index.js:9:2088

apple-reminders 2023-10-30 at 15 09 35

thomaslombart commented 1 year ago

I shipped another fix that will hopefully solve your problem: https://github.com/raycast/extensions/commit/19c58d2dd265a8352eeeff270cf4057368d9d50e. Could you try out once again when it's published (in ~30 minutes) and after checking the extension updates?

teziovsky commented 1 year ago

Now works as expected 🚀🎊 Thank you for this fix!

thomaslombart commented 1 year ago

Glad it works! 🙌