souvik-ghosh / react-native-create-thumbnail

iOS/Android thumbnail generator with support for both local and remote videos
MIT License
246 stars 105 forks source link

error in CreateThumbnailModule.java IOException is never thrown #76

Closed anirudh-antino closed 1 year ago

anirudh-antino commented 1 year ago
node_modules/react-native-create-thumbnail/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java:194: error: exception IOException is never thrown in body of corresponding try statement
        } catch(IOException e) {
          ^
 try {
            retriever.release();
        } catch(IOException e) { <------- here
            e.printStackTrace();
        }
canismayorisxl commented 1 year ago

There is a catch already in the parent function just a throws IOException would suffice.

fukemy commented 1 year ago

I install v0.16.3 but still got this problem

john-vuong commented 1 year ago

This is the same https://github.com/react-native-cameraroll/react-native-cameraroll/issues/402

Set the compile/target SDK to version 33 (Android 13) to recreate the error.

Thanks!

souvik-ghosh commented 1 year ago
node_modules/react-native-create-thumbnail/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java:194: error: exception IOException is never thrown in body of corresponding try statement
        } catch(IOException e) {
          ^
 try {
            retriever.release();
        } catch(IOException e) { <------- here
            e.printStackTrace();
        }

The problem with adding this code is that the library won't work on Android version < 13 anymore. So we planned to support android 13 from v2.0.0 onwards. Currently, it's available as a pre-release v2.0.0-rc.2.

souvik-ghosh commented 8 months ago

UPDATE: v2.0.0 has been released with the fix