Add deep diagnostic logging for ViewShot failures
This commit is contained in:
@@ -204,12 +204,17 @@ export default function PreviewScreen({
|
||||
// ── Capture the final image ──
|
||||
const captureComposite = async (fallbackPhoto: string = currentPhoto) => {
|
||||
try {
|
||||
logger.log(`captureComposite started. Has ViewShot ref: ${!!viewShotRef.current}`);
|
||||
if (viewShotRef.current) {
|
||||
return await viewShotRef.current.capture();
|
||||
logger.log('Executing viewShotRef.current.capture()...');
|
||||
const uri = await viewShotRef.current.capture();
|
||||
logger.log(`ViewShot successfully generated collage URI: ${uri}`);
|
||||
return uri;
|
||||
}
|
||||
logger.log('[WARNING] viewShotRef.current was null, falling back to raw photo.');
|
||||
return fallbackPhoto;
|
||||
} catch (e: any) {
|
||||
logger.error('Failed to capture composite', e);
|
||||
logger.error('Failed to capture composite (ViewShot crashed)', e?.message || e);
|
||||
return fallbackPhoto;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user