NativeScript / NativeScript/plugins
[@nativescript/imagepicker] - app crashes on video selection that is unloaded to iCloud
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 206
- Forks
- 123
- Ø Merge
- 2 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Using @nativescript/imagepicker
When I pick a video that's stored locally it works as expected but if the video is old and is unloaded to iCloud to save device's storage it crashes the app immediately with the following error:
authorizing...
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught Error: The file couldn\M-b\M^@\M^Z\M-C\M^D\M-C\M-4t be opened.
at
_loop_2(file: src/webpack:/mitch/node_modules/@nativescript/imagepicker/index.ios.js:148:0)
at (file: src/webpack:/mitch/node_modules/@nativescript/imagepicker/index.ios.js:158:0)
at timer(file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:2405:0)
at invokeTask(file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:406:0)
at runTask(file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:178:0)
at invokeTask(file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:487:0)
at ZoneTask.invoke(file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:476:0)
at data.args.<computed>(file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:2385:0)
at invoke(file: src/webpack:/mitch/node_modules/@nativescript/core/timer/index.ios.js:54:0)
at invoke(file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:372:0)
at runGuarded(file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:144:0)
at (file: src/webpack:/mitch/node_modules/zone.js/fesm2015/zone.js:128:0)
at TimerTargetImpl.tick(file: src/webpack:/mitch/node_modules/@nativescript/core/timer/index.ios.js:18:0)
and this is how I'm handling video selection:
if (result === "Add video") {
this.mediaType = "video";
let videoPicker = imagePickerPlugin.create({
mode: 'single',
mediaType: ImagePickerMediaType.Video
});
this.startVideoSelection(videoPicker);
}
---
startVideoSelection(videoPicker) {
videoPicker
.authorize()
.then(() => videoPicker.present())
.then((selection) => {
console.log('Selection done: ' + JSON.stringify(selection));
this.processVideo(selection);
})
.catch((err) => {
console.log(err);
// this.errorMessage = err;
});
}
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne bei @nativescript/imagepicker/index.ios.js ungefähr in den Zeilen 148–158, wie im Stack Trace angegeben, und reproduziere die Auswahl eines Videos, das nach iCloud ausgelagert wurde. Die Aufgabe ist erledigt, wenn diese Auswahl die App nicht mehr zum Absturz bringt und der Fehler über den Picker-Ablauf behandelt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- ios, typescript
- Bereich
- mobile-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 32/100