expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
30.93k stars 4.89k forks source link

[expo-av] Cannot convert 'null' to a Kotlin type. #24515

Closed leethree closed 9 months ago

leethree commented 9 months ago

Minimal reproducible example

loadAsync({ uri }) will always break

Summary

The error happens when trying to load any audio via { uri } because the other two default parameters cannot be convert to Android native side correctly.

Upon investigation, this is caused by #23902 because it requires a core fix #23942 which is yet to be released.

Therefore #23902 is currently breaking expo-av >=13.6.0 on expo 49 (latest stable version) on Android. The workaround is to downgrade expo-av to 13.5.

In my opinion this change should be marked as a breaking change so it's clear that there is version compatibility issue. Or at least the new version shouldn't be released as "stable" when the depending change is not released in expo core.

Environment

expo-env-info 1.0.5 environment info: System: OS: macOS 13.5.2 Shell: 5.9 - /bin/zsh Binaries: Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.1/bin/yarn npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm Watchman: 2023.09.04.00 - /opt/homebrew/bin/watchman SDKs: iOS SDK: Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4 IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.10121639 Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild npmPackages: expo: 49.0.10 => 49.0.10 react: 18.2.0 => 18.2.0 react-native: 0.72.4 => 0.72.4 Expo Workflow: bare

expo-bot commented 9 months ago

Hi there! It looks like your issue requires a minimal reproducible example, but it is invalid or absent. Please prepare such an example and share it in a new issue.

The best way to get attention to your issue is to provide a clean and easy way for a developer to reproduce the issue on their own machine. Please do not provide your entire project, or a project with more code than is necessary to reproduce the issue.

A side benefit of going through the process of narrowing down the minimal amount of code needed to reproduce the issue is that you may get lucky and discover that the bug is due to a mistake in your application code that you can quickly fix on your own.

Resources

namcancode commented 9 months ago

same, "expo": "49.0.11",

VictorioMolina commented 9 months ago

Same here w/ expo 48 and no changes in my code, which had not this error last month

jarcoder commented 8 months ago

Same. Expo 49.0.x. Any ideas?

thanhloc-17 commented 8 months ago

same

mihailapuste commented 7 months ago

Also currently experiencing this issue. Any updates?

tevfik1 commented 7 months ago

Same

thegirlyoucallryan commented 7 months ago

Anyone figure this out? Error loading sound: [Error: Cannot convert 'null' to a Kotlin type.] It was working until I ran prebuild. Am I missing something?

mihailapuste commented 7 months ago

@thegirlyoucallryan Upgrading to expo 50 solved the issue for me!

thegirlyoucallryan commented 7 months ago

{

"dependencies": { "@fortawesome/fontawesome-svg-core": "^6.5.0", "@fortawesome/free-solid-svg-icons": "^6.5.0", "@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-native-fontawesome": "^0.3.0", "@react-native-async-storage/async-storage": "1.18.2", "@react-native-google-signin/google-signin": "^10.1.1", "@react-native-masked-view/masked-view": "0.2.9", "@react-native-picker/picker": "2.4.10", "@react-navigation/material-bottom-tabs": "^6.2.19", "@react-navigation/native": "^6.1.9", "@react-navigation/stack": "^6.3.20", "@supabase/supabase-js": "^2.39.0", "axios": "^1.6.2", "expo": "~49.0.15", "expo-av": "~13.4.1", "expo-splash-screen": "~0.20.5", "expo-status-bar": "~1.6.0", "react": "18.2.0", "react-native": "0.72.6", "react-native-gesture-handler": "~2.12.0", "react-native-linear-gradient": "^2.8.3", "react-native-paper": "^5.11.3", "react-native-picker-select": "^9.0.0", "react-native-safe-area-context": "4.6.3", "react-native-select-dropdown": "^3.4.0", "react-native-svg": "13.9.0", "react-native-url-polyfill": "^2.0.0", "react-native-vector-icons": "^10.0.2", "react-navigation": "^5.0.0", "react-navigation-header-buttons": "^11.1.1", "react-redux": "^8.1.3", "redux": "^4.2.1", "redux-thunk": "^2.4.2" }, "devDependencies": { "@babel/core": "^7.20.0", "@types/react": "~18.2.14", "@types/react-native": "^0.72.7", "react-native-dotenv": "^3.4.9", "supabase": "^1.115.4", "typescript": "^5.1.3" }, "private": true } This is running for me without an error.

seanislegend commented 6 months ago

I ran into the same issue, for production builds only. Downgrading expo-av to 13.5.0 solved it for now.