Starting project at /Users/sergei/Desktop/WellNuo React Compiler enabled Starting Metro Bundler The following packages should be updated for best compatibility with the installed expo version: expo@54.0.30 - expected version: ~54.0.31 expo-constants@18.0.12 - expected version: ~18.0.13 Your project may not work correctly until you install the expected versions of the packages. › Opening exp://172.20.10.10:8081 on 8081 Waiting on http://localhost:8081 Logs for your project will appear below. Could not fetch new Expo development certificate, falling back to cached certificate iOS Bundled 531ms node_modules/expo-router/entry.js (1421 modules) LOG expo-speech-recognition not available LOG [Voice] expo-speech-recognition not available in Expo Go LOG [Layout] Still initializing auth state... LOG [AuthContext] checkAuth starting... LOG [AuthContext] checkAuth: Checking token... LOG [AuthContext] checkAuth: Token exists=true, length=187 LOG [AuthContext] checkAuth: isAuth=true LOG [AuthContext] checkAuth: Getting stored user... LOG [API] getStoredUser: token exists = true , userId = 62 LOG [API] getStoredUser: Fetching profile from server... LOG [API] getStoredUser: Profile response ok = true , error = undefined LOG [AuthContext] checkAuth: User found=true LOG [AuthContext] checkAuth: Finished LOG [Layout] Auth check: {"hasInitialRedirect": false, "inAuthGroup": false, "isAuthenticated": true} LOG [API] getAllBeneficiaries - token exists: true length: 187 LOG [API] getAllBeneficiaries - Fetching from: https://wellnuo.smartlaunchhub.com/api/me/beneficiaries LOG [API] getAllBeneficiaries - Response status: 200 LOG [API] getAllBeneficiaries - Data: {"beneficiaries":[{"accessId":41,"id":21,"role":"custodian","grantedAt":"2026-01-09T04:15:44.403Z","name":"Mama","phone":null,"address":null,"avatarUrl":null,"createdAt":"2026-01-09T04:15:43.079Z","su LOG [API] getWellNuoBeneficiary - Raw response: {"id":21,"name":"Mama","hasDevices":false,"equipmentStatus":"none"} LOG [API] getAllBeneficiaries - token exists: true length: 187 LOG [API] getAllBeneficiaries - Fetching from: https://wellnuo.smartlaunchhub.com/api/me/beneficiaries LOG [API] getWellNuoBeneficiary - Raw response: {"id":21,"name":"Mama","hasDevices":false,"equipmentStatus":"none"} LOG [API] getAllBeneficiaries - Response status: 200 LOG [API] getAllBeneficiaries - Data: {"beneficiaries":[{"accessId":41,"id":21,"role":"custodian","grantedAt":"2026-01-09T04:15:44.403Z","name":"Mama","phone":null,"address":null,"avatarUrl":null,"createdAt":"2026-01-09T04:15:43.079Z","su LOG [API] getWellNuoBeneficiary - Raw response: {"id":22,"name":"Mama2","hasDevices":false,"equipmentStatus":"none"} LOG [Purchase] Creating payment sheet for userId: 62 beneficiaryId: 22 ERROR Payment error: [Error: ephemeralKey is not defined] Code: purchase.tsx   119 |  120 | if (!data.paymentIntent) { > 121 | throw new Error(data.error || 'Failed to create payment sheet');  | ^  122 | }  123 |  124 | const { error: initError } = await initPaymentSheet({ Call Stack handlePurchase (app/(auth)/purchase.tsx:121:24) LOG [Purchase] Creating payment sheet for userId: 62 beneficiaryId: 22 ERROR Payment error: [Error: ephemeralKey is not defined] Code: purchase.tsx   119 |  120 | if (!data.paymentIntent) { > 121 | throw new Error(data.error || 'Failed to create payment sheet');  | ^  122 | }  123 |  124 | const { error: initError } = await initPaymentSheet({ Call Stack handlePurchase (app/(auth)/purchase.tsx:121:24) Could not fetch new Expo development certificate, falling back to cached certificate iOS Bundled 83ms node_modules/expo-router/entry.js (1 module) LOG expo-speech-recognition not available LOG [Voice] expo-speech-recognition not available in Expo Go LOG [Layout] Still initializing auth state... LOG [AuthContext] checkAuth starting... LOG [AuthContext] checkAuth: Checking token... LOG [AuthContext] checkAuth: Token exists=true, length=187 LOG [AuthContext] checkAuth: isAuth=true LOG [AuthContext] checkAuth: Getting stored user... LOG [API] getStoredUser: token exists = true , userId = 62 LOG [API] getStoredUser: Fetching profile from server... LOG [API] getStoredUser: Profile response ok = true , error = undefined LOG [AuthContext] checkAuth: User found=true LOG [AuthContext] checkAuth: Finished LOG [Layout] Auth check: {"hasInitialRedirect": false, "inAuthGroup": false, "isAuthenticated": true} LOG [API] getAllBeneficiaries - token exists: true length: 187 LOG [API] getAllBeneficiaries - Fetching from: https://wellnuo.smartlaunchhub.com/api/me/beneficiaries LOG [API] getAllBeneficiaries - Response status: 200 LOG [API] getAllBeneficiaries - Data: {"beneficiaries":[{"accessId":41,"id":21,"role":"custodian","grantedAt":"2026-01-09T04:15:44.403Z","name":"Mama","phone":null,"address":null,"avatarUrl":null,"createdAt":"2026-01-09T04:15:43.079Z","su LOG [API] getWellNuoBeneficiary - Raw response: {"id":22,"name":"Mama2","hasDevices":false,"equipmentStatus":"none"} LOG [API] getWellNuoBeneficiary - Raw response: {"id":22,"name":"Mama2","hasDevices":false,"equipmentStatus":"none"} ERROR Payment error: [Error: ephemeralKey is not defined] Code: purchase.tsx   113 |  114 | if (!data.paymentIntent) { > 115 | throw new Error(data.error || 'Failed to create payment sheet');  | ^  116 | }  117 |  118 | const { error: initError } = await initPaymentSheet({ Call Stack handlePurchase (app/(tabs)/beneficiaries/[id]/purchase.tsx:115:24) Could not fetch new Expo development certificate, falling back to cached certificate iOS node_modules/expo-router/entry.js ░░░░░░░░░░░░░░░░ 0.0% (0/1) iOS Bundled 68ms node_modules/expo-router/entry.js (1 module) LOG expo-speech-recognition not available LOG [Voice] expo-speech-recognition not available in Expo Go LOG [Layout] Still initializing auth state... LOG [AuthContext] checkAuth starting... LOG [AuthContext] checkAuth: Checking token... LOG [AuthContext] checkAuth: Token exists=true, length=187 LOG [AuthContext] checkAuth: isAuth=true LOG [AuthContext] checkAuth: Getting stored user... LOG [API] getStoredUser: token exists = true , userId = 62 LOG [API] getStoredUser: Fetching profile from server... LOG [API] getStoredUser: Profile response ok = true , error = undefined LOG [AuthContext] checkAuth: User found=true LOG [AuthContext] checkAuth: Finished LOG [Layout] Auth check: {"hasInitialRedirect": false, "inAuthGroup": false, "isAuthenticated": true} LOG [API] getAllBeneficiaries - token exists: true length: 187 LOG [API] getAllBeneficiaries - Fetching from: https://wellnuo.smartlaunchhub.com/api/me/beneficiaries LOG [API] getAllBeneficiaries - Response status: 200 LOG [API] getAllBeneficiaries - Data: {"beneficiaries":[]} LOG [API] getAllBeneficiaries - token exists: true length: 187 LOG [API] getAllBeneficiaries - Fetching from: https://wellnuo.smartlaunchhub.com/api/me/beneficiaries LOG [API] getAllBeneficiaries - Response status: 200 LOG [API] getAllBeneficiaries - Data: {"beneficiaries":[]} LOG [API] getAllBeneficiaries - token exists: true length: 187 LOG [API] getAllBeneficiaries - Fetching from: https://wellnuo.smartlaunchhub.com/api/me/beneficiaries LOG [API] getAllBeneficiaries - Response status: 200 LOG [API] getAllBeneficiaries - Data: {"beneficiaries":[{"accessId":41,"id":21,"role":"custodian","grantedAt":"2026-01-09T04:15:44.403Z","name":"Mama","phone":null,"address":null,"createdAt":"2026-01-09T04:15:43.079Z","subscription":{"pla LOG [API] getWellNuoBeneficiary - Raw response: {"id":21,"name":"Mama","hasDevices":false,"equipmentStatus":"none"} LOG [API] getWellNuoBeneficiary - Raw response: {"id":21,"name":"Mama","hasDevices":false,"equipmentStatus":"none"} LOG [API] getAllBeneficiaries - token exists: true length: 187 LOG [API] getAllBeneficiaries - Fetching from: https://wellnuo.smartlaunchhub.com/api/me/beneficiaries LOG [API] getAllBeneficiaries - Response status: 200 LOG [API] getAllBeneficiaries - Data: {"beneficiaries":[{"accessId":41,"id":21,"role":"custodian","grantedAt":"2026-01-09T04:15:44.403Z","name":"Mama","phone":null,"address":null,"createdAt":"2026-01-09T04:15:43.079Z","subscription":{"pla LOG [API] getWellNuoBeneficiary - Raw response: {"id":23,"name":"Mama3","hasDevices":false,"equipmentStatus":"none"} LOG [Purchase] Creating payment sheet for userId: 62 beneficiaryId: 23 LOG [Purchase] Payment successful, updating equipment status... LOG [API] getWellNuoBeneficiary - Raw response: {"id":23,"name":"Mama3","hasDevices":false,"equipmentStatus":"ordered"} LOG [API] getWellNuoBeneficiary - Raw response: {"id":23,"name":"Mama3","hasDevices":true,"equipmentStatus":"demo"} LOG [API] getWellNuoBeneficiary - Raw response: {"id":23,"name":"Mama3","hasDevices":true,"equipmentStatus":"demo"} ERROR Payment error: [Error: Failed to create subscription] Code: subscription.tsx   143 |  144 | if (!data.clientSecret) { > 145 | throw new Error(data.error || 'Failed to create subscription');  | ^  146 | }  147 |  148 | // 2. Initialize the Payment Sheet Call Stack handleSubscribe (app/(tabs)/beneficiaries/[id]/subscription.tsx:145:24) LOG [API] getWellNuoBeneficiary - Raw response: {"id":23,"name":"Mama3","hasDevices":true,"equipmentStatus":"demo"} LOG [DEBUG] loadBeneficiary: fetching id=23 LOG [API] getWellNuoBeneficiary - Raw response: {"id":23,"name":"Mama3","hasDevices":true,"equipmentStatus":"demo"} LOG [DEBUG] loadBeneficiary: response.ok=true LOG [DEBUG] loadBeneficiary: got beneficiary id=23, name=Mama3 LOG [DEBUG] loadBeneficiary: fetching id=23 LOG [API] getWellNuoBeneficiary - Raw response: {"id":23,"name":"Mama3","hasDevices":true,"equipmentStatus":"demo"} LOG [DEBUG] loadBeneficiary: response.ok=true LOG [DEBUG] loadBeneficiary: got beneficiary id=23, name=Mama3 LOG [DEBUG] handleSubscribe: START LOG [DEBUG] handleSubscribe: beneficiary={"id":23,"name":"Mama3"} LOG [DEBUG] handleSubscribe: token=eyJhbGciOiJIUzI1NiIs... LOG [DEBUG] handleSubscribe: calling https://wellnuo.smartlaunchhub.com/api/stripe/create-subscription-payment-sheet LOG [DEBUG] handleSubscribe: body={"beneficiaryId":23} LOG [DEBUG] handleSubscribe: response.status=200 LOG [DEBUG] handleSubscribe: response data={"subscriptionId":"sub_1SnYNwP0gvUw6M9CMooRyBOz","ephemeralKey":"ek_test_YWNjdF8xUDNrZHFQMGd2VXc2TTlDLGlmOGdHVldBc1ppNkxxZmM1N1B2WXJuZWNSZ1lRbkg_00BcXeNVrC","customer":"cus_Tl4QHSfVqjstea","publishableKey":"pk_test_51P3kdqP0gvUw6M9C7ixPQHqbPcvga4G5kAYx1h6QXQAt1psbrC2rrmOojW0fTeQzaxD1Q9RKS3zZ23MCvjjZpWLi00eCFWRHMk"} ERROR Payment error: [Error: Failed to create subscription] Code: subscription.tsx   180 |  181 | if (!data.clientSecret) { > 182 | throw new Error(data.error || 'Failed to create subscription');  | ^  183 | }  184 |  185 | // 2. Initialize the Payment Sheet Call Stack handleSubscribe (app/(tabs)/beneficiaries/[id]/subscription.tsx:182:24) Unable to resolve "react-native-root-toast" from "app/(tabs)/beneficiaries/[id]/subscription.tsx"   21 | import type { Beneficiary } from '@/types';  22 | import * as ExpoClipboard from 'expo-clipboard'; > 23 | import Toast from 'react-native-root-toast';  | ^  24 |  25 | const STRIPE_API_URL = 'https://wellnuo.smartlaunchhub.com/api/stripe';  26 | const SUBSCRIPTION_PRICE = 49; // $49/month Import stack: app/(tabs)/beneficiaries/[id]/subscription.tsx | import "react-native-root-toast" app (require.context) Unable to resolve "react-native-root-toast" from "app/(tabs)/beneficiaries/[id]/subscription.tsx"   21 | import type { Beneficiary } from '@/types';  22 | import * as ExpoClipboard from 'expo-clipboard'; > 23 | import Toast from 'react-native-root-toast';  | ^  24 |  25 | const STRIPE_API_URL = 'https://wellnuo.smartlaunchhub.com/api/stripe';  26 | const SUBSCRIPTION_PRICE = 49; // $49/month Import stack: app/(tabs)/beneficiaries/[id]/subscription.tsx | import "react-native-root-toast" app (require.context) Unable to resolve "react-native-root-toast" from "app/(tabs)/beneficiaries/[id]/subscription.tsx"   21 | import type { Beneficiary } from '@/types';  22 | import * as ExpoClipboard from 'expo-clipboard'; > 23 | import Toast from 'react-native-root-toast';  | ^  24 |  25 | const STRIPE_API_URL = 'https://wellnuo.smartlaunchhub.com/api/stripe';  26 | const SUBSCRIPTION_PRICE = 49; // $49/month Import stack: app/(tabs)/beneficiaries/[id]/subscription.tsx | import "react-native-root-toast" app (require.context)