Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error whenever I try to add an Item #85

Open
davidchoibennu opened this issue Mar 5, 2024 · 0 comments
Open

Fatal error whenever I try to add an Item #85

davidchoibennu opened this issue Mar 5, 2024 · 0 comments

Comments

@davidchoibennu
Copy link

I installed the plugin for ios and doing this call

Capacitor.Plugins.Playlist.addItem( { trackId: 1, assetUrl: "my-asset.mp3", albumArt: "my-album-art.jpg" } )

or this one

Capacitor.Plugins.Playlist.addItem( { item: { trackId: 1, assetUrl: "my-asset.mp3", albumArt: "my-album-art.jpg" } })

raises a fatal error on Xcode in the file CapacitorPluginPlaylist/Plugin.swift line 43

@objc func addItem(_ call: CAPPluginCall) {
        let trackInfo = call.getObject("item")
        
        let track = AudioTrack.initWithDictionary(trackInfo)
        audioPlayerImpl.addItem(track!) - Thread 12: Fatal error: Unexpectedly found nil while unwrapping an Optional value
        
        call.resolve();
    }

This is my package.json dependencies

  "dependencies": {
    "@capacitor-community/facebook-login": "^5.0.0",
    "@capacitor-firebase/analytics": "5.2.0",
    "@capacitor-firebase/authentication": "5.2.0",
    "@capacitor-firebase/messaging": "5.2.0",
    "@capacitor-firebase/remote-config": "^5.2.0",
    "@capacitor/android": "^5.0.0",
    "@capacitor/app": "^5.0.0",
    "@capacitor/assets": "^2.0.4",
    "@capacitor/camera": "^5.0.0",
    "@capacitor/clipboard": "^5.0.0",
    "@capacitor/core": "^5.0.0",
    "@capacitor/device": "^5.0.0",
    "@capacitor/ios": "^5.0.0",
    "@capacitor/push-notifications": "^5.0.0",
    "@capacitor/share": "^5.0.0",
    "@capacitor/splash-screen": "^5.0.0",
    "@capawesome/capacitor-badge": "^5.0.0",
    "@revenuecat/purchases-capacitor": "^7.0.0",
    "capacitor-native-settings": "^5.0.0",
    "capacitor-plugin-app-tracking-transparency": "^2.0.4",
    "capacitor-plugin-playlist": "^0.4.0",
    "capacitor-rate-app": "^4.0.3",
    "firebase": "^9.18.0",
    "sharp": "^0.32.0"
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant