react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

🐛 After Scanning QR code ,Half Screen get Black

Open shubh-neorox opened this issue 7 months ago • 11 comments

What's happening?

I implemented one QR scanner component ,once the user scan that code , after reading that data I am navigating user to another screen ,navigation is getting successful but it shows black screen half of the display and when press back button or changing orientension of device it vanish.already using the same component at one place it working , but this module getting this issue only in release mode in debug mode it works like a charm.

Reproduceable Code

import React, { useState, useEffect, useRef } from "react";
import {
  View,
  Text,
  StyleSheet,
  TouchableOpacity,
  Image,
  SafeAreaView,
  ScrollView,
  Alert,
  Platform,
  ActivityIndicator,
} from "react-native";
import { useNavigation, useRoute } from "@react-navigation/native";
import {
  responsiveHeight,
  responsiveWidth,
  responsiveSize,
} from "../../layout";
import { s, vs, ms, mvs } from "react-native-size-matters";
import {
  Camera,
  useCameraDevice,
  useCameraPermission,
  useCodeScanner,
} from "react-native-vision-camera";
import NoInternetBanner from "../../components/common/NoInternetBanner";
import FONTS from "../../constants/fonts";
import Colors from "../../constants/colors";
import { useIsFocused } from '@react-navigation/native';
import AsyncStorage from "@react-native-async-storage/async-storage";
import apiService from "../../api/apiServices";
import { decryptAES256 } from "../../services/encryptionService";

// Scanner Component - Separate component for better isolation and cleanup
const Scanner = ({ onScanned, onCancel }) => {
  const device = useCameraDevice("back");
  const [isMounted, setIsMounted] = useState(true);
  
  useEffect(() => {
    return () => {
      // Ensure cleanup when unmounting
      setIsMounted(false);
    };
  }, []);
  
  const codeScanner = useCodeScanner({
    codeTypes: ["qr"],
    onCodeScanned: (codes) => {
      if (!isMounted) return;
      
      if (codes.length > 0 && codes[0]?.value) {
        onScanned(codes[0].value);
      }
    },
  });

  if (!device) {
    return (
      <View style={styles.scannerContainer}>
        <Text style={styles.scannerText}>Camera not available</Text>
      </View>
    );
  }

  return (
    <View style={styles.scannerContainer}>
      <Camera
        style={styles.camera}
        device={device}
        isActive={isMounted}
        codeScanner={codeScanner}
      />
      <TouchableOpacity
        style={styles.cancelScanButton}
        onPress={onCancel}
      >
        <Text style={styles.cancelScanText}>Cancel</Text>
      </TouchableOpacity>
    </View>
  );
};

const SharedUserDetails = () => {
  const navigation = useNavigation();
  const route = useRoute();
  const { userData } = route.params || {};
  const [isLoading, setIsLoading] = useState(true);
  const [isProcessingQR, setIsProcessingQR] = useState(false); // Added state for QR processing
  const [isScanning, setIsScanning] = useState(false);
  const { hasPermission, requestPermission } = useCameraPermission();
  const isFocused = useIsFocused();

  useEffect(() => {
    const initializeData = async () => {
      try {
        if (userData?.encryptionKey) {
          // Store the encryption key temporarily if not already stored
          await storeSharedKey(userData);

          // After storing the key, navigate directly to SharedPrivateScreen
          navigateToSharedPrivate(userData);
        }
      } catch (error) {
        console.error("Error initializing shared user data:", error);
        Alert.alert("Error", "Failed to load shared data. Please try again.");
      } finally {
        setIsLoading(false);
      }
    };

    initializeData();
  }, [userData]);

  const storeSharedKey = async (user) => {
    try {
      // Store the shared encryption key with the user ID as identifier
      const sharedKeysString =
        (await AsyncStorage.getItem("SHARED_KEYS")) || "{}";
      const sharedKeys = JSON.parse(sharedKeysString);

      // Only store if not already present
      if (!sharedKeys[user.userId]) {
        sharedKeys[user.userId] = {
          encryptionKey: user.encryptionKey,
          name: user.name,
          id: user.id,
        };

        await AsyncStorage.setItem("SHARED_KEYS", JSON.stringify(sharedKeys));
      }

      // Set this as the current active shared key for decryption
      await AsyncStorage.setItem("SHARED_ENCRYPTION_KEY", user.encryptionKey);
      await AsyncStorage.setItem("SHARED_USER_ID", user.userId);
      if (user.keyId) {
        await AsyncStorage.setItem("SHARED_KEY_ID", user.keyId);
      }
      await AsyncStorage.setItem(
        "SHARED_USER_NAME",
        `${userData?.firstName || ""} ${userData?.lastName || ""}`.trim() || "Shared User"
      );
    } catch (error) {
      console.error("Error storing shared key:", error);
      throw error;
    }
  };

  const navigateToSharedPrivate = (user) => {
    // Navigate directly to SharedPrivateScreen
    navigation.navigate("SharedPrivateScreen", {
      userName: user.firstName || "Shared User",
      userId: user.userId,
      encryptionKey: user.encryptionKey,
      keyId: user.keyId,
    });
  };

  const handleBackPress = () => {
    navigation.goBack();
  };

  const handleScanQR = async () => {
    // Request camera permission if not already granted
    if (!hasPermission) {
      const granted = await requestPermission();
      if (!granted) {
        Alert.alert(
          "Camera Permission Required",
          "Please grant camera permission to scan QR codes."
        );
        return;
      }
    }

    setIsScanning(true);
  };

  const handleQRCodeScanned = async (value) => {
    try {
      // Set processing states immediately 
      setIsScanning(false);
      setIsProcessingQR(true);
      
      // Log the QR value for debugging
      console.log("QR code scanned, processing value...");
      console.log("Full QR value scanned:", value);
      
      // We'll wait for camera resources to be released
      await cleanupCameraResources();
      
      console.log("Camera closed, now processing QR data:", value);
      
      // Parse and validate QR code
      const parts = value.split("_");
      if (parts.length < 2) {
        throw new Error("Invalid QR code format. Expected at least encryption key and user ID.");
      }
      
      // Extract values
      const scannedEncryptionKey = parts[0];
      let scannedUserId, scannedKeyId;
      
      if (parts.length >= 3) {
        // Old format: encryptionKey_keyId_userId
        scannedKeyId = parts[1];
        scannedUserId = parts[2];
        console.log("Scanned QR Code Data (old format):");
      } else {
        // New format: encryptionKey_userId
        scannedUserId = parts[1];
        scannedKeyId = scannedUserId;
        console.log("Scanned QR Code Data (new format):");
      }
      
      console.log("Encryption Key:", scannedEncryptionKey);
      console.log("Key ID:", scannedKeyId);
      console.log("User ID:", scannedUserId);
      
      console.log("Storing QR data in AsyncStorage...");
      
      // Store all values in AsyncStorage (wait for all to complete)
      await Promise.all([
        AsyncStorage.setItem("SHARED_ENCRYPTION_KEY", scannedEncryptionKey),
        AsyncStorage.setItem("SHARED_KEY_ID", scannedKeyId),
        AsyncStorage.setItem("SHARED_USER_ID", scannedUserId)
      ]);
      
      // Create user data object with the scanned info
      const scannedUserData = {
        encryptionKey: scannedEncryptionKey,
        keyId: scannedKeyId,
        userId: scannedUserId,
        name: userData?.firstName,
      };
      
      // Store the shared key info (wait for this to complete)
      await storeSharedKey(scannedUserData);
      
      console.log("Data stored successfully, preparing for navigation");
      
      // Prepare navigation parameters
      const navigationParams = {
        userName: `${userData?.firstName || ""} ${userData?.lastName || ""}`.trim() || "Shared User",
        userId: scannedUserId,
        encryptionKey: scannedEncryptionKey,
        keyId: scannedKeyId,
      };
      
      console.log("Navigating to SharedPrivateScreen with parameters:", JSON.stringify(navigationParams));
      
      // Only navigate when everything else is done
      navigation.navigate("SharedPrivateScreen", navigationParams);
    } catch (error) {
      console.error("Error processing scanned QR code:", error);
      Alert.alert(
        "Error Processing QR Code", 
        error.message || "Failed to process the QR code. Please try again."
      );
    } finally {
      // Always make sure to reset loading states
      setIsProcessingQR(false);
    }
  };
  
  // This function ensures camera resources are properly released
  const cleanupCameraResources = () => {
    return new Promise(resolve => {
      // We'll give the camera a moment to clean up resources
      setTimeout(resolve, 800);
    });
  };

  // If camera is scanning, show the scanner component
  if (isScanning) {
    return (
      <SafeAreaView style={styles.container}>
        <NoInternetBanner />
        <Scanner 
          onScanned={handleQRCodeScanned}
          onCancel={() => setIsScanning(false)}
        />
      </SafeAreaView>
    );
  }
  
  // If processing QR after scanning, show the loading screen
  if (isProcessingQR) {
    return (
      <SafeAreaView style={styles.container}>
        <NoInternetBanner />
        <View style={styles.loadingContainer}>
          <ActivityIndicator size="large" color={Colors.primary} />
          <Text style={styles.loadingText}>Processing QR code data...</Text>
        </View>
      </SafeAreaView>
    );
  }
  
  console.log("where is user data:-", userData);
  
  return (
    <SafeAreaView style={styles.container}>
      <NoInternetBanner />
      <View style={styles.headerContainer}>
        <TouchableOpacity onPress={handleBackPress} style={styles.iconButton}>
          <Image
            source={require("../../assets/backArrow.png")}
            style={styles.icon}
            tintColor={"black"}
          />
        </TouchableOpacity>

        <View style={styles.headerTitlePlaceholder} />
        <View style={styles.rightIcons} />
      </View>

      {/* Screen Title with reduced gap */}
      <View style={styles.screenTitleContainer}>
        {/* Name on first line */}
        <Text style={styles.screenTitleText}>
          {userData?.firstName} {userData?.lastName}
        </Text>

        {/* "Shared with you" with blue dot on second line - with reduced gap */}
        <View style={styles.subtitleContainer}>
          <Text style={styles.subtitleText}>Shared with you</Text>
          <Text style={styles.dot}>•</Text>
        </View>
      </View>

      {isLoading ? (
        <View style={styles.loadingContainer}>
          <ActivityIndicator size="large" color={Colors.primary} />
          <Text style={styles.loadingText}>Loading shared data...</Text>
        </View>
      ) : (
        <ScrollView contentContainerStyle={styles.contentContainer}>
          <View style={styles.qrSectionContainer}>
            <TouchableOpacity style={styles.scanButton} onPress={handleScanQR}>
              <Image
                source={require("../../assets/scan.png")}
                style={styles.scanIcon}
                resizeMode="contain"
              />
              <Text style={styles.scanButtonText}>Scan QR Code</Text>
            </TouchableOpacity>
          </View>
          {/* Screen Title with reduced gap */}
          <View style={styles.screenTitleContainer}>
            {/* "Shared with you" with blue dot on second line - with reduced gap */}
            <View style={styles.subtitleContainer}>
              <Text style={styles.subtitleText}>Important</Text>
              <Text style={styles.dot}>•</Text>
            </View>
          </View>
          <View style={styles.infoBox}>
            <Text style={styles.infoText}>
              You are about to scan{" "}
              {`${userData?.firstName || ""} ${userData?.lastName || ""}`}
              {!userData?.firstName && !userData?.lastName
                ? "this user"
                : "'s"}{" "}
              QR code to access his encryption key and data.
            </Text>

            <Text style={styles.legalText}>
              By proceeding, you acknowledge and agree to maintain the
              confidentiality of all shared content. Any unauthorized use or
              disclosure may result in legal consequences.
            </Text>
          </View>
        </ScrollView>
      )}
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "white",
  },
  header: {
    flexDirection: "row",
    alignItems: "center",
    paddingHorizontal: responsiveWidth(5),
    marginTop: Platform.OS === "android" ? responsiveHeight(2) : 0,
    marginBottom: responsiveHeight(2),
  },
  backButton: {
    padding: responsiveSize(10),
  },
  backIcon: {
    width: responsiveSize(24),
    height: responsiveSize(24),
  },
  headerTitleContainer: {
    marginLeft: responsiveWidth(2),
  },
  headerTitle: {
    fontSize: s(20),
    fontFamily: FONTS.medium,
    color: Colors.fonts,
  },
  headerSubtitle: {
    fontSize: s(14),
    fontFamily: FONTS.regular,
    color: "#8E8E93",
    marginTop: responsiveHeight(0.5),
  },
  loadingContainer: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center",
  },
  loadingText: {
    marginTop: responsiveHeight(2),
    fontSize: s(16),
    fontFamily: FONTS.regular,
    color: Colors.fonts,
  },
  contentContainer: {
    flexGrow: 1,
    paddingHorizontal: responsiveWidth(5),
    paddingBottom: responsiveHeight(5),
  },
  qrSectionContainer: {
    alignItems: "center",
    marginBottom: responsiveHeight(3),
  },
  scanButton: {
    flexDirection: "row",
    alignItems: "center",
    justifyContent: "center",
    backgroundColor: Colors.primary,
    borderRadius: 100,
    paddingVertical: responsiveHeight(1.5),
    paddingHorizontal: responsiveWidth(5),
    width: "80%",
  },
  scanIcon: {
    width: responsiveSize(20),
    height: responsiveSize(20),
    tintColor: "white",
    marginRight: responsiveWidth(2),
  },
  scanButtonText: {
    color: "white",
    fontSize: s(16),
    fontFamily: FONTS.medium,
  },
  infoBox: {
    width: responsiveWidth(87),
    alignSelf: "center",
    top:-s(20)
  },
  infoTitle: {
    fontSize: s(20),
    fontFamily: FONTS.bold,
    color: Colors.fonts,
    marginBottom: responsiveHeight(1.5),
    textAlign: "center",
    fontWeight: "600",
  },
  infoText: {
    fontSize: 16,
    fontFamily: FONTS.regular,
    color: Colors.fonts,
    marginBottom: responsiveHeight(2),
    textAlign: "center",
  },
  legalText: {
    fontSize: 16,
    fontFamily: FONTS.regular,
    color: Colors.fonts,
    textAlign: "center",
  },
  scannerContainer: {
    flex: 1,
    position: "relative",
  },
  camera: {
    flex: 1,
  },
  scannerText: {
    fontSize: s(16),
    fontFamily: FONTS.regular,
    color: Colors.fonts,
    textAlign: "center",
    marginTop: responsiveHeight(20),
  },
  cancelScanButton: {
    position: "absolute",
    bottom: responsiveHeight(5),
    alignSelf: "center",
    backgroundColor: "white",
    paddingVertical: responsiveHeight(1),
    paddingHorizontal: responsiveWidth(8),
    borderRadius: 100,
  },
  cancelScanText: {
    fontSize: s(16),
    fontFamily: FONTS.medium,
    color: Colors.primary,
  },
  // Updated styles to match Header component exactly
  headerContainer: {
    flexDirection: "row",
    alignItems: "center",
    justifyContent: "space-between",
    paddingVertical: responsiveHeight(2),
    backgroundColor: "white",
    alignSelf: "center",
    width: responsiveWidth(87),
  },
  iconButton: {
    width: 35,
    height: 35,
    borderRadius: responsiveSize(100),
    borderColor: "rgba(210, 212, 218, 1)",
    borderWidth: 1,
    justifyContent: "center",
    alignItems: "center",
  },
  icon: {
    width: 20,
    height: 20,
  },
  headerTitlePlaceholder: {
    flex: 1,
  },
  rightIcons: {
    width: 35, // Maintain symmetry with the back button
  },
  screenTitleContainer: {
    alignSelf:'center',
    justifyContent: "center",
    alignItems: "center",
    paddingVertical: responsiveHeight(2),
    top: responsiveSize(-10), // Match the top adjustment from ScreenTitle
  },
  screenTitleText: {
    fontSize: 20,
    fontWeight: "600",
    textAlign: "center",
    fontFamily: FONTS.bold,
    color: "black",
  },
  subtitleContainer: {
    flexDirection: "row",
    alignItems: "center",
    marginTop: responsiveHeight(-0.2),
  },
  subtitleText: {
    fontSize: 22,
    fontWeight: "600",
    textAlign: "center",
    fontFamily: FONTS.bold,
    color: "black",
  },
  dot: {
    color: "#573CFA",
    fontSize: 24,
    marginLeft: responsiveSize(1),
    fontFamily: FONTS.regular,
    top: responsiveSize(3),
  },
});

export default SharedUserDetails;

Relevant log output

(DLC[];PCL[base.apk*3864036239]{PCL[/system/framework/org.apache.http.legacy.jar*437079508]#PCL[/system/framework/com.android.media.remotedisplay.jar*2042759013]#PCL[/system/framework/com.android.location.provider.jar*3414091812]#PCL[/system_ext/framework/androidx.window.extensions.jar*1129906209]#PCL[/system_ext/framework/androidx.window.sidecar.jar*1790051800]} | DLC[];PCL[])
2025-05-15 17:01:02.166 18213-18240 libMEOW                 zygote64                             D  applied 1 plugins for [com.onsfer]:
2025-05-15 17:01:02.201 18213-18213 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libjscexecutor.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:02.202 18213-18231 com.onsfer              zygote64                             W  ClassLoaderContext classpath element checksum mismatch. expected=3864036239, found=1920800015 (DLC[];PCL[base.apk*3864036239]{PCL[/system/framework/org.apache.http.legacy.jar*437079508]#PCL[/system/framework/com.android.media.remotedisplay.jar*2042759013]#PCL[/system/framework/com.android.location.provider.jar*3414091812]#PCL[/system_ext/framework/androidx.window.extensions.jar*1129906209]#PCL[/system_ext/framework/androidx.window.sidecar.jar*1790051800]} | DLC[];PCL[/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk*1920800015]{PCL[/system/framework/org.apache.http.legacy.jar*437079508]})
2025-05-15 17:01:02.205 18213-18242 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libreactnativejni.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:02.207 18213-18242 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libfbjni.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:02.211  1564-2039  SurfaceFlinger          surfaceflinger                       D  [SF client] NEW(0xb400007802121180) for (18213:com.onsfer)
2025-05-15 17:01:02.228  7974-8533  BiometricS...reAuthInfo system_server                        D  Package: com.onsfer Sensor ID: 1008 Modality: 8 Status: 4
2025-05-15 17:01:02.229  7974-8533  BiometricS...reAuthInfo system_server                        D  Package: com.onsfer Sensor ID: 0 Modality: 2 Status: 1
2025-05-15 17:01:02.230  1564-2039  BufferQueueDebug        surfaceflinger                       I  [b5cec76 com.onsfer/com.onsfer.MainActivity#168351](this:0xb4000078017a0020,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:02.239  7974-10075 CoreBackPreview         system_server                        D  Window{b5cec76 u0 com.onsfer/com.onsfer.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@2fbff4d, mPriority=0, mIsAnimationCallback=false}
2025-05-15 17:01:02.240  1564-2497  BufferQueueDebug        surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:02.254 18213-18242 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libVisionCamera.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes5.dex): ok
2025-05-15 17:01:02.275 18213-18237 libMEOW                 zygote64                             D  applied 1 plugins for [com.onsfer]:
2025-05-15 17:01:02.278 18213-18246 com.onsfer              zygote64                             E  No package ID 6d found for resource ID 0x6d0b000f.
2025-05-15 17:01:02.280 18213-18246 FA                      zygote64                             I  To enable faster debug mode event logging run:
                                                                                                      adb shell setprop debug.firebase.analytics.app com.onsfer
2025-05-15 17:01:02.281  7974-8002  SurfaceComposerClient   system_server                        D  Transaction::apply InputWindowCommands.focusRequests timestamp=669018390555645, windowName=b5cec76 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:02.296  1564-1564  SurfaceFlinger          surfaceflinger                       D  Focus addInputWindowCommands timestamp=669018390555645, windowName=b5cec76 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:02.306  1564-2497  SurfaceFlinger          surfaceflinger                       D  [SF client] NEW(0xb40000780249b480) for (18213:com.onsfer)
2025-05-15 17:01:02.313  1564-1956  SurfaceFlinger          surfaceflinger                       D  updateWinowInfo=1, setFocusedWindow timestamp=669018390555645, windowName=b5cec76 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:02.321  7974-9590  PackageManager          system_server                        W  Missing required system package: com.onsfer, but found with extended search.
2025-05-15 17:01:02.325  1564-2497  BufferQueueDebug        surfaceflinger                       I  [4f12cfe com.onsfer/com.onsfer.MainActivity#168358](this:0xb40000780170e820,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:02.338  1564-2497  BufferQueueDebug        surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168361](this:0xb400007801864820,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:02.344  7974-8002  SurfaceComposerClient   system_server                        D  Transaction::apply InputWindowCommands.focusRequests timestamp=669018456106414, windowName=4f12cfe com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:02.360  1564-1564  SurfaceFlinger          surfaceflinger                       D  Focus addInputWindowCommands timestamp=669018456106414, windowName=4f12cfe com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:02.369  7974-10075 CoreBackPreview         system_server                        D  Window{4f12cfe u0 com.onsfer/com.onsfer.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@5431a29, mPriority=0, mIsAnimationCallback=false}
2025-05-15 17:01:02.372 18213-18237 com.onsfer              zygote64                             D  Can't load libmbrainSDK
2025-05-15 17:01:02.383  1564-1956  SurfaceFlinger          surfaceflinger                       D  updateWinowInfo=1, setFocusedWindow timestamp=669018456106414, windowName=4f12cfe com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:02.388 18213-18237 com.onsfer              zygote64                             D  Can't load libmbrainSDK
2025-05-15 17:01:02.422  7974-7998  MotoPerfManagerService  system_server                        I  handleAppStart 10491:com.onsfer cold 12 99 94 71 404
2025-05-15 17:01:02.423 18213-18260 InteractionJankMonitor  zygote64                             W  Initializing without READ_DEVICE_CONFIG permission. enabled=false, interval=1, missedFrameThreshold=3, frameTimeThreshold=64, package=com.onsfer
2025-05-15 17:01:02.425  7974-7998  ActivityTaskManager     system_server                        I  Displayed com.onsfer/.MainActivity for user 0: +404ms
2025-05-15 17:01:02.430  1564-2039  BufferQueueDebug        surfaceflinger                       I  [Surface(name=c9bdc66 Splash Screen com.onsfer)/@0x4cc5aba - animation-leash of starting_reveal#168362](this:0xb400007801870820,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:02.462  7974-8111  ImeTracker              system_server                        I  com.onsfer:e8ab9f15: onRequestHide at ORIGIN_SERVER reason HIDE_UNSPECIFIED_WINDOW fromUser false
2025-05-15 17:01:02.462  7974-8111  ImeTracker              system_server                        I  com.onsfer:e8ab9f15: onCancelled at PHASE_SERVER_SHOULD_HIDE
2025-05-15 17:01:02.470 20336-25291 AbstractServiceBroker   com.google.android.gms               W  calling package is not null : com.onsfer for service ids : [93] [CONTEXT service_id=259 ]
2025-05-15 17:01:02.492 18213-18251 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libyoga.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:02.493  7974-9590  ActivityTaskManager     system_server                        D  animate false:prepareAnimation=false isVisibleByPolicy=false ActivityRecord{3b0298e u0 com.onsfer/.MainActivity t4330} callers:com.android.server.wm.ActivityRecord.onSplashScreenAttachComplete:3047 com.android.server.wm.ActivityRecord.splashScreenAttachedLocked:6867 com.android.server.wm.ActivityClientController.splashScreenAttached:1030 android.app.IActivityClientController$Stub.onTransact:1379 com.android.server.wm.ActivityClientController.onTransact:173 
2025-05-15 17:01:02.497  7974-8249  PowerHalWrapper         system_server                        I  amsBoostNotify pid:22908,activity:com.android.launcher3.CustomizationPanelLauncher, package:com.motorola.launcher3, mProcessCreatePackcom.onsfer 
2025-05-15 17:01:02.502  3709-3709  GoogleInpu...hodService com...gle.android.inputmethod.latin  I  GoogleInputMethodService.onStartInput():1233 onStartInput(EditorInfo{EditorInfo{packageName=com.onsfer, inputType=0, inputTypeString=NULL, enableLearning=false, autoCorrection=false, autoComplete=false, imeOptions=0, privateImeOptions=null, actionName=UNSPECIFIED, actionLabel=null, initialSelStart=-1, initialSelEnd=-1, initialCapsMode=0, label=null, fieldId=0, fieldName=null, extras=null, hintText=null, hintLocales=[]}}, false)
2025-05-15 17:01:02.503  7974-8015  MotoBatteryCareService  system_server                        W  uid: 10491 pkgName:com.onsfer come to foreground
2025-05-15 17:01:02.510  7974-9590  ConnectivityService     system_server                        D  requestNetwork for uid/pid:10491/18213 activeRequest: null callbackRequest: 63385 [NetworkRequest [ REQUEST id=63386, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10491 RequestorUid: 10491 RequestorPkg: com.onsfer UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647 isUidTracked: false declaredMethods: ALL
2025-05-15 17:01:02.513  7974-8533  PackageConfigPersister  system_server                        W  App-specific configuration not found for packageName: com.onsfer and userId: 0
2025-05-15 17:01:02.517  7974-8154  OemPaidWif...orkFactory system_server                        D  got request NetworkRequest [ REQUEST id=63386, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10491 RequestorUid: 10491 RequestorPkg: com.onsfer UnderlyingNetworks: Null] ]
2025-05-15 17:01:02.518  7974-8154  MultiInter...orkFactory system_server                        D  got request NetworkRequest [ REQUEST id=63386, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10491 RequestorUid: 10491 RequestorPkg: com.onsfer UnderlyingNetworks: Null] ]
2025-05-15 17:01:02.520  7974-8154  WifiNetworkFactory      system_server                        D  got request NetworkRequest [ REQUEST id=63386, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10491 RequestorUid: 10491 RequestorPkg: com.onsfer UnderlyingNetworks: Null] ]
2025-05-15 17:01:02.520  7974-8154  UntrustedW...orkFactory system_server                        D  got request NetworkRequest [ REQUEST id=63386, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10491 RequestorUid: 10491 RequestorPkg: com.onsfer UnderlyingNetworks: Null] ]
2025-05-15 17:01:02.573  8251-8341  BufferQueueConsumer     com.android.systemui                 D  [Splash Screen com.onsfer#168346(BLAST Consumer)pid:8251](id:203b00001c45,api:0,p:-1,c:8251) disconnect
2025-05-15 17:01:02.574  7974-10075 InputManager-JNI        system_server                        W  Input channel object 'c9bdc66 Splash Screen com.onsfer (client)' was disposed without first being removed with the input manager!
2025-05-15 17:01:02.588  1564-1564  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=Splash Screen com.onsfer#168346, layerId=168346, parentId=0
2025-05-15 17:01:02.588  1564-1564  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=c9bdc66 Splash Screen com.onsfer#168345, layerId=168345, parentId=0
2025-05-15 17:01:02.607  1564-1564  BufferQueueDebug        surfaceflinger                       I  [c9bdc66 Splash Screen com.onsfer#168345](this:0xb4000078014fb820,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:02.608  1564-1564  BufferQueueDebug        surfaceflinger                       I  [Splash Screen com.onsfer#168346](this:0xb40000780154d020,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:03.119  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:-1
2025-05-15 17:01:03.119  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:03.889  1564-2497  SurfaceFlinger          surfaceflinger                       D  [SF client] NEW(0xb40000780215ed00) for (18213:com.onsfer)
2025-05-15 17:01:03.892  1564-2497  BufferQueueDebug        surfaceflinger                       I  [4c3d8c2 com.onsfer/com.onsfer.MainActivity#168364](this:0xb4000078014fb820,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:03.946  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=1.98 dur=1514.05 max=1412.69 min=28.19
2025-05-15 17:01:03.966  1564-2497  BufferQueueDebug        surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168367](this:0xb40000780167d820,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:03.970  7974-8531  CoreBackPreview         system_server                        D  Window{4c3d8c2 u0 com.onsfer/com.onsfer.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@ffedf3c, mPriority=0, mIsAnimationCallback=false}
2025-05-15 17:01:03.978  7974-8002  SurfaceComposerClient   system_server                        D  Transaction::apply InputWindowCommands.focusRequests timestamp=669020082661491, windowName=4c3d8c2 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:03.981 18213-18213 BufferQueueConsumer     zygote64                             D  [com.onsfer/com.onsfer.MainActivity#168361(BLAST Consumer)pid:18213](id:472500000001,api:0,p:-1,c:18213) disconnect
2025-05-15 17:01:03.986  7974-8064  InputManager-JNI        system_server                        W  Input channel object '4f12cfe com.onsfer/com.onsfer.MainActivity (client)' was disposed without first being removed with the input manager!
2025-05-15 17:01:03.991  7974-10108 WindowManager           system_server                        I  setOnBackInvokedCallback(): No window state for package:com.onsfer
2025-05-15 17:01:03.991  7974-8064  CoreBackPreview         system_server                        D  Window{4c3d8c2 u0 com.onsfer/com.onsfer.MainActivity}: Setting back callback null
2025-05-15 17:01:03.992  7974-10108 InputManager-JNI        system_server                        W  Input channel object '4c3d8c2 com.onsfer/com.onsfer.MainActivity (client)' was disposed without first being removed with the input manager!
2025-05-15 17:01:03.993  1564-1652  BufferQueueDebug        surfaceflinger                       I  [Surface(name=4c3d8c2 com.onsfer/com.onsfer.MainActivity)/@0x4eaa841 - animation-leash of window_animation#168369](this:0xb400007801773820,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:03.997  1564-1564  SurfaceFlinger          surfaceflinger                       D  Focus addInputWindowCommands timestamp=669020082661491, windowName=4c3d8c2 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:04.008  1564-1956  SurfaceFlinger          surfaceflinger                       D  updateWinowInfo=1, setFocusedWindow timestamp=669020082661491, windowName=4c3d8c2 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:04.011  7974-8002  SurfaceComposerClient   system_server                        D  Transaction::apply InputWindowCommands.focusRequests timestamp=669020119786030, windowName=b5cec76 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:04.014  1564-1564  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=Surface(name=4c3d8c2 com.onsfer/com.onsfer.MainActivity)/@0x4eaa841 - animation-leash of window_animation#168369, layerId=168369, parentId=0
2025-05-15 17:01:04.014  1564-1564  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=4c3d8c2 com.onsfer/com.onsfer.MainActivity#168364, layerId=168364, parentId=0
2025-05-15 17:01:04.014  1564-1564  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=4f12cfe com.onsfer/com.onsfer.MainActivity#168358, layerId=168358, parentId=0
2025-05-15 17:01:04.014  1564-1564  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=com.onsfer/com.onsfer.MainActivity#168361, layerId=168361, parentId=0
2025-05-15 17:01:04.021 18213-18226 BufferQueueConsumer     zygote64                             D  [com.onsfer/com.onsfer.MainActivity#168367(BLAST Consumer)pid:18213](id:472500000002,api:0,p:-1,c:18213) disconnect
2025-05-15 17:01:04.022  1564-1653  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=com.onsfer/com.onsfer.MainActivity#168367, layerId=168367, parentId=0
2025-05-15 17:01:04.030  1564-1564  SurfaceFlinger          surfaceflinger                       D  Focus addInputWindowCommands timestamp=669020119786030, windowName=b5cec76 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:04.031  1564-1564  BufferQueueDebug        surfaceflinger                       I  [4c3d8c2 com.onsfer/com.onsfer.MainActivity#168364](this:0xb4000078014fb820,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:04.034  1564-1564  BufferQueueDebug        surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168367](this:0xb40000780167d820,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:04.034  1564-1564  BufferQueueDebug        surfaceflinger                       I  [4f12cfe com.onsfer/com.onsfer.MainActivity#168358](this:0xb40000780170e820,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:04.034  1564-1564  BufferQueueDebug        surfaceflinger                       I  [Surface(name=4c3d8c2 com.onsfer/com.onsfer.MainActivity)/@0x4eaa841 - animation-leash of window_animation#168369](this:0xb400007801773820,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:04.035  1564-1564  BufferQueueDebug        surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168361](this:0xb400007801864820,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:04.051  1564-1956  SurfaceFlinger          surfaceflinger                       D  updateWinowInfo=1, setFocusedWindow timestamp=669020119786030, windowName=b5cec76 com.onsfer/com.onsfer.MainActivity
2025-05-15 17:01:04.067 18213-18250 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libreactnativeblob.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:04.087 18213-18213 libMEOW                 zygote64                             D  applied 1 plugins for [com.onsfer]:
2025-05-15 17:01:04.100  7974-8111  ImeTracker              system_server                        I  com.onsfer:ac998075: onRequestHide at ORIGIN_SERVER reason HIDE_ALWAYS_HIDDEN_STATE fromUser false
2025-05-15 17:01:04.101  7974-8111  ImeTracker              system_server                        I  com.onsfer:ac998075: onCancelled at PHASE_SERVER_SHOULD_HIDE
2025-05-15 17:01:04.114  3709-3709  GoogleInpu...hodService com...gle.android.inputmethod.latin  I  GoogleInputMethodService.onStartInput():1233 onStartInput(EditorInfo{EditorInfo{packageName=com.onsfer, inputType=0, inputTypeString=NULL, enableLearning=false, autoCorrection=false, autoComplete=false, imeOptions=0, privateImeOptions=null, actionName=UNSPECIFIED, actionLabel=null, initialSelStart=-1, initialSelEnd=-1, initialCapsMode=0, label=null, fieldId=0, fieldName=null, extras=null, hintText=null, hintLocales=[]}}, false)
2025-05-15 17:01:04.117  7974-8531  PackageConfigPersister  system_server                        W  App-specific configuration not found for packageName: com.onsfer and userId: 0
2025-05-15 17:01:04.121 18213-18319 com.onsfer              zygote64                             W  Entry not found
2025-05-15 17:01:04.956  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=21.77 dur=1010.38 max=171.04 min=17.36
2025-05-15 17:01:05.119  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:60
2025-05-15 17:01:05.120  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:05.968  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=28.67 dur=1011.68 max=67.14 min=31.83
2025-05-15 17:01:06.994  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=30.19 dur=1026.66 max=33.61 min=32.72
2025-05-15 17:01:08.021  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=30.19 dur=1026.82 max=33.39 min=32.68
2025-05-15 17:01:08.112 18213-18357 ProfileInstaller        zygote64                             D  Installing profile for com.onsfer
2025-05-15 17:01:09.048  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=26.29 dur=1027.18 max=66.39 min=32.91
2025-05-15 17:01:09.115 18213-18250 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/librnscreens.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes6.dex): ok
2025-05-15 17:01:09.347 18213-18251 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libreact_featureflagsjni.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:09.502 18213-18362 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libimagepipeline.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:11.121  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:-1
2025-05-15 17:01:11.121  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:11.677  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=4.95 dur=2628.61 max=1866.11 min=16.52
2025-05-15 17:01:12.121  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:60
2025-05-15 17:01:12.121  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:12.268  1564-2497  SurfaceFlinger          surfaceflinger                       D  [SF client] REMOVE (0xb40000780249b480) for (18213:com.onsfer)
2025-05-15 17:01:12.268  1564-2497  SurfaceFlinger          surfaceflinger                       D  [SF client] REMOVE (0xb40000780215ed00) for (18213:com.onsfer)
2025-05-15 17:01:12.269 18213-18220 com.onsfer              zygote64                             W  ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~0o6sHfoUodY0ll5pe2WWdA==/com.google.android.webview-9Gog4lAFsLmKY5gLRknoOQ==/base.apk' with 2 weak references
2025-05-15 17:01:12.693  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=57.07 dur=1016.26 max=77.39 min=10.72
2025-05-15 17:01:13.144 18213-18362 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libnative-imagetranscoder.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:14.723  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=16.25 dur=2030.17 max=1146.53 min=10.83
2025-05-15 17:01:15.730  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=36.75 dur=1006.67 max=303.56 min=10.36
2025-05-15 17:01:16.122  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:90
2025-05-15 17:01:16.122  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:17.122  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:-1
2025-05-15 17:01:17.122  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:20.004  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=6.79 dur=4273.65 max=3964.18 min=8.26
2025-05-15 17:01:20.018 18213-18250 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/librnworklets.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes6.dex): ok
2025-05-15 17:01:20.021 18213-18250 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libturbomodulejsijni.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes3.dex): ok
2025-05-15 17:01:21.126  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:60
2025-05-15 17:01:21.127  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:21.302  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=21.57 dur=1297.99 max=747.81 min=9.42
2025-05-15 17:01:21.455  7784-8009  CameraService           cameraserver                         I  CameraService::connect call (PID 18213 "com.onsfer", camera ID 0) and Camera API version 2
2025-05-15 17:01:21.456  7974-10208 CameraService_proxy     system_server                        D   rootTaskInfo topActivity: ComponentInfo{com.onsfer/com.onsfer.MainActivity}
2025-05-15 17:01:21.456  7974-10208 CameraService_proxy     system_server                        D  camera useage: com.onsfer.MainActivity
2025-05-15 17:01:21.459  7784-8009  Camera2ClientBase       cameraserver                         I  Camera 0: Opened. Client: com.onsfer (PID 18213, UID 10491)
2025-05-15 17:01:21.461  7974-10208 CameraService_proxy     system_server                        V      cameraClientName: com.onsfer
2025-05-15 17:01:21.461  1564-1653  SurfaceFlinger          surfaceflinger                       D  [SF client] NEW(0xb40000781f66d180) for (18213:com.onsfer)
2025-05-15 17:01:21.461 13392-13400 AbstractServiceBroker   com.google.android.gms.persistent    W  calling package is not null : com.onsfer for service ids : [270] [CONTEXT service_id=259 ]
2025-05-15 17:01:21.465  1564-1653  BufferQueueDebug        surfaceflinger                       I  [Bounds for - com.onsfer/com.onsfer.MainActivity#168374](this:0xb40000780154d020,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:21.466  1564-2497  BufferQueueDebug        surfaceflinger                       I  [SurfaceView[com.onsfer/com.onsfer.MainActivity]#168375](this:0xb40000780158b020,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:21.466  1564-2497  BufferQueueDebug        surfaceflinger                       I  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376](this:0xb40000780163b020,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:21.467  1564-1653  BufferQueueDebug        surfaceflinger                       I  [Background for SurfaceView[com.onsfer/com.onsfer.MainActivity]#168377](this:0xb40000780167d820,id:-1,api:0,p:-1,c:-1) BufferQueue core=(1564:/system/bin/surfaceflinger)
2025-05-15 17:01:21.468 18213-18213 BLASTBufferQueue        zygote64                             D  [SurfaceView[com.onsfer/com.onsfer.MainActivity]#3](f:0,a:0) constructor()
2025-05-15 17:01:21.468 18213-18213 BLASTBufferQueue        zygote64                             D  [SurfaceView[com.onsfer/com.onsfer.MainActivity]#3](f:0,a:0) update width=1600 height=1200 format=4 mTransformHint=0
2025-05-15 17:01:21.740 18213-18225 BLASTBufferQueue        zygote64                             D  [SurfaceView[com.onsfer/com.onsfer.MainActivity]#3](f:0,a:1) acquireNextBufferLocked size=1600x1200 mFrameNumber=1 applyTransaction=true mTimestamp=669037760336100 mPendingTransactions.size=0 graphicBufferId=78224239362096 transform=4
2025-05-15 17:01:21.748 18213-18471 nativeloader            zygote64                             D  Load /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!/lib/arm64-v8a/libbarhopper_v3.so using ns clns-7 from class loader (caller=/data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk!classes4.dex): ok
2025-05-15 17:01:21.779 13392-13400 AbstractServiceBroker   com.google.android.gms.persistent    W  calling package is not null : com.onsfer for service ids : [270] [CONTEXT service_id=259 ]
2025-05-15 17:01:22.126  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:-1
2025-05-15 17:01:22.126  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:22.776  1564-1564  BufferQueueProducer     surfaceflinger                       I  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376](this:0xb40000780163b020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=24.31 dur=1028.26 max=65.99 min=31.95
2025-05-15 17:01:23.789  1564-1564  BufferQueueProducer     surfaceflinger                       I  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376](this:0xb40000780163b020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=27.63 dur=1013.43 max=50.04 min=32.55
2025-05-15 17:01:23.974 18213-18303 BLASTBufferQueue        zygote64                             D  [SurfaceView[com.onsfer/com.onsfer.MainActivity]#3](f:0,a:1) destructor()
2025-05-15 17:01:23.974 18213-18303 BufferQueueConsumer     zygote64                             D  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376(BLAST Consumer)pid:18213](id:472500000006,api:4,p:7784,c:18213) disconnect
2025-05-15 17:01:23.978 18213-18225 BufferQueueProducer     zygote64                             E  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376(BLAST Consumer)pid:18213](id:472500000006,api:4,p:7784,c:18213) queueBuffer: BufferQueue has been abandoned
2025-05-15 17:01:23.990  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=1.49 dur=2688.63 max=2491.11 min=13.80
2025-05-15 17:01:23.992 18213-18225 BufferQueueProducer     zygote64                             E  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376(BLAST Consumer)pid:18213](id:472500000006,api:4,p:7784,c:18213) cancelBuffer: BufferQueue has been abandoned
2025-05-15 17:01:24.001 18213-18303 BufferQueueProducer     zygote64                             E  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376(BLAST Consumer)pid:18213](id:472500000006,api:4,p:7784,c:18213) cancelBuffer: BufferQueue has been abandoned
2025-05-15 17:01:24.002 18213-18223 BufferQueueProducer     zygote64                             E  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376(BLAST Consumer)pid:18213](id:472500000006,api:4,p:7784,c:18213) cancelBuffer: BufferQueue has been abandoned
2025-05-15 17:01:24.003 18213-18223 BufferQueueProducer     zygote64                             E  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376(BLAST Consumer)pid:18213](id:472500000006,api:4,p:7784,c:18213) cancelBuffer: BufferQueue has been abandoned
2025-05-15 17:01:24.008  1564-1653  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=Background for SurfaceView[com.onsfer/com.onsfer.MainActivity]#168377, layerId=168377, parentId=0
2025-05-15 17:01:24.008  1564-1653  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=SurfaceView[com.onsfer/com.onsfer.MainActivity]#168375, layerId=168375, parentId=0
2025-05-15 17:01:24.008  1564-1653  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376, layerId=168376, parentId=0
2025-05-15 17:01:24.010 18213-18303 BufferQueueProducer     zygote64                             E  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376(BLAST Consumer)pid:18213](id:472500000006,api:4,p:7784,c:18213) queueBuffer: BufferQueue has been abandoned
2025-05-15 17:01:24.011 18213-18303 BufferQueueProducer     zygote64                             E  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376(BLAST Consumer)pid:18213](id:472500000006,api:4,p:7784,c:18213) cancelBuffer: BufferQueue has been abandoned
2025-05-15 17:01:24.011  1564-1564  BufferQueueDebug        surfaceflinger                       I  [Background for SurfaceView[com.onsfer/com.onsfer.MainActivity]#168377](this:0xb40000780167d820,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:24.032  1564-1564  BufferQueueDebug        surfaceflinger                       I  [SurfaceView[com.onsfer/com.onsfer.MainActivity]#168375](this:0xb40000780158b020,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:24.032  1564-1564  BufferQueueDebug        surfaceflinger                       I  [SurfaceView[com.onsfer/com.onsfer.MainActivity](BLAST)#168376](this:0xb40000780163b020,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:24.125  7974-8498  CameraService_proxy     system_server                        V      cameraClientName: com.onsfer
2025-05-15 17:01:25.000  1564-1564  BufferQueueProducer     surfaceflinger                       I  [com.onsfer/com.onsfer.MainActivity#168352](this:0xb400007801681020,id:-1,api:0,p:-1,c:1564) queueBuffer: fps=2.97 dur=1009.50 max=939.58 min=19.36
2025-05-15 17:01:25.127  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:60
2025-05-15 17:01:25.128  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:25.526  1564-2040  SurfaceFlinger          surfaceflinger                       I  onHandleDestroyed: name=Surface(name=c9bdc66 Splash Screen com.onsfer)/@0x4cc5aba - animation-leash of starting_reveal#168362, layerId=168362, parentId=0
2025-05-15 17:01:25.526  7784-8009  Camera2ClientBase       cameraserver                         I  ~Camera2ClientBase: Client object's dtor for Camera Id 0 completed. Client was: com.onsfer (PID 18213, UID 10491)
2025-05-15 17:01:25.530  1564-1564  BufferQueueDebug        surfaceflinger                       I  [Surface(name=c9bdc66 Splash Screen com.onsfer)/@0x4cc5aba - animation-leash of starting_reveal#168362](this:0xb400007801870820,id:-1,api:0,p:-1,c:1564) onDestructor()
2025-05-15 17:01:27.128  1512-1573  libPowerHal             [email protected]  I  [perfNotifyAppState] pack:com.onsfer, act:com.onsfer.MainActivity, state:5, pid:18213, uid:10491, fps:-1
2025-05-15 17:01:27.129  1512-1573  UxUtility               [email protected]  I  notifyForegroundApp pack:com.onsfer, uid:10491
2025-05-15 17:01:41.420  8251-8258  ndroid.systemui         com.android.systemui                 W  ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~UN2-gumnXS510VEKLb1VBw==/com.onsfer-tzLNyC2DDyo7szerINHUXA==/base.apk' with 2 weak references

Camera Device

LOG  {
  "formats": [],
  "sensorOrientation": "landscape-left",
  "hardwareLevel": "full",
  "maxZoom": 8,
  "minZoom": 1,
  "maxExposure": 24,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": false,
  "isMultiCam": false,
  "minFocusDistance": 0,
  "minExposure": -24,
  "name": "0 (BACK) androidx.camera.camera2",
  "hasFlash": true,
  "hasTorch": true,
  "position": "back",
  "id": "0"
}

Device

Moto G64

VisionCamera Version

^4.5.3

Can you reproduce this issue in the VisionCamera Example app?

No, I cannot reproduce the issue in the Example app

Additional information

shubh-neorox avatar May 15 '25 14:05 shubh-neorox

Guten Tag, Hans here! 🍻

Thanks for providing a detailed report. It looks like a potential issue with the library when in release mode. However, I see that you didn’t include any logs from adb logcat, which would really help mrousavy to diagnose the problem. Can you please run your app with adb logcat while reproducing the issue and provide the logs here?

That way, we can assist you better. Also, if you find this project useful, consider sponsoring to support its ongoing development!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

maintenance-hans[bot] avatar May 15 '25 14:05 maintenance-hans[bot]

@mrousavy

shubh-neorox avatar May 16 '25 08:05 shubh-neorox

IOS 18.5 get black screen. works on IOS 18.3

h1nson avatar May 26 '25 02:05 h1nson

I also have this problem on Android in release mode. But debug mode works fine.

1280103995 avatar Jul 10 '25 03:07 1280103995

Same issue on Android 15, react native 0.73, react-native-vision-camera 4.0.5

gitliyu avatar Jul 10 '25 07:07 gitliyu

On Android, this solves the problem, if pasted on the same level as the camera component. We don't know why. {Platform.OS === 'android' && ( <Text style={{ zIndex: 1, position: 'absolute', }} >{' '}</Text> )}

Ektilth avatar Jul 28 '25 12:07 Ektilth

On Android, this solves the problem, if pasted on the same level as the camera component. We don't know why. {Platform.OS === 'android' && ( <Text style={{ zIndex: 1, position: 'absolute', }} >{' '}</Text> )}

Works for me, thanks very much

gitliyu avatar Aug 14 '25 08:08 gitliyu

On Android, this solves the problem, if pasted on the same level as the camera component. We don't know why. {Platform.OS === 'android' && ( <Text style={{ zIndex: 1, position: 'absolute', }} >{' '}</Text> )}

Yep! That worked for me too. It was happening the same issue of black bars in my case near the status bar and little bit more. My camera is a popup on a gorhom BottomSheetModal. When dismissing the popup the black bars were there. Even if I conditionally render the popup or null.

RN 0.79.6 New Arch react-native-vision-camera": "^4.6.1"

smfunder avatar Oct 04 '25 21:10 smfunder

On Android, this solves the problem, if pasted on the same level as the camera component. We don't know why. {Platform.OS === 'android' && ( <Text style={{ zIndex: 1, position: 'absolute', }} >{' '}</Text> )}

Works for me, thanks very much

@gitliyu 是放在哪个位置,和camera组件同一层是嘛

zhengjialu520 avatar Oct 14 '25 02:10 zhengjialu520

On Android, this solves the problem, if pasted on the same level as the camera component. We don't know why. {Platform.OS === 'android' && ( <Text style={{ zIndex: 1, position: 'absolute', }} >{' '}</Text> )}

Works for me, thanks very much

@gitliyu 是放在哪个位置,和camera组件同一层是嘛

{isAndroid && ( <Text style={{ zIndex: 1, position: 'absolute' }} >{' '}</Text> )}
<Camera {...commonCameraProps} style={cameraStyle.camera} />

Yeah. Just put it together with camera component.

gitliyu avatar Oct 14 '25 02:10 gitliyu

On Android, this solves the problem, if pasted on the same level as the camera component. We don't know why. {Platform.OS === 'android' && ( <Text style={{ zIndex: 1, position: 'absolute', }} >{' '}</Text> )}

Works for me, thanks very much

@gitliyu 是放在哪个位置,和camera组件同一层是嘛

{isAndroid && ( <Text style={{ zIndex: 1, position: 'absolute' }} >{' '}</Text> )} <Camera {...commonCameraProps} style={cameraStyle.camera} /> Yeah. Just put it together with camera component.

@gitliyu Thanks♪(・ω・)ノ,我试试

zhengjialu520 avatar Oct 14 '25 02:10 zhengjialu520