This topic was originally posted by rbh on 2/13/2024.
This content has been migrated from our previous community forum to preserve valuable discussions.
This code runs fine in the simulator, but once it reaches our userâs iOS 17.4 app, we get an opaque âSomething went Wrongâ on both sapphire mainnet and devnet. On iOS 17.2 in simulator and on macOS , this error doesnât occur at all.
import { LOGIN_PROVIDER } from '@web3auth/react-native-sdk'
import Web3Auth from '@web3auth/react-native-sdk'
import * as SecureStore from 'expo-secure-store'
import * as WebBrowser from 'expo-web-browser'
import { errorLike } from 'misc'
import { config } from â../configâ
import { isExpoGo } from â../is-expo-goâ
import { getAddress } from â./ethereum-interfaceâ // for using ethers.js
import type { LoginSource } from â./login-sourceâ
async login(sms: string): Promise<string | undefined> {
// âexpâ is the schema used when going through Expo Go.
// Linking into your app - Expo Documentation
const redirectUrl = ${isExpoGo ? 'exp' : 'com.antelo.now'}://onlogin
try {
await this.ensureInitialized()
await this.web3auth.login({
loginProvider: LOGIN_PROVIDER.SMS_PASSWORDLESS,
redirectUrl,
extraLoginOptions: {
login_hint: sms,
},
})
if (!this.web3auth.privKey) {
throw new Error('Login failed')
}
return getAddress(this.web3auth.privKey)
} catch (e) {
if (errorLike(e).message?.includes('error type dismiss')) {
// user dismissed web3auth attempt (for example, by navigating back)
return undefined
}
throw e
}
}
async walletAddress(): Promise<string | undefined> {
await this.ensureInitialized()
try {
if (this.web3auth.userInfo() !== undefined) {
return getAddress(this.web3auth.privKey)
}
} catch (e) {
if (errorLike(e).message === âuser should be logged in to fetch userInfoâ) {
return undefined
}
This issue is particularly seen when the session has expired or within 15 minutes the login procedure is not completed. Please let me know if this happens.
We appreciate you reaching out and highlighting this issue. The error youâre encountering could be related to how Safariâs âHide IP Addressâ feature interacts with our authentication process. This feature, while enhancing privacy, may interfere with certain authentication protocols that rely on IP consistency to maintain session integrity.
We take such matters seriously and are investigating potential solutions that respect user privacy while maintaining a seamless authentication experience. In the meantime, as a workaround, you could inform your users about the potential impact of the âHide IP Addressâ setting on login sessions within your appâs FAQ or troubleshooting guide.
Thank you for your patience and understanding as we work to resolve this. If you have any further information that could help us in our investigation, please feel free to share.
Adding to what Maharshi has mentioned, we are working internally for a workaround for cases where IP Addresses will be hidden for the users. Just to add to this, currently no production user should be impacted by this, since the iOS v17.4 has introduced this feature and is currently in beta. The current production version of iOS remains v17.3.1 - Apple security releases - Apple Support
Getting on a call will not solve this issue. This is affecting all our integrations and our team is effectively working on this. Once pushed it will be automatically fixed for you. Please bear with us in the meantime.
I wanted to give you a quick update on the issue youâve been experiencing. Our team has been diligently working on resolving it for the past few weeks. It turns out that the problem is rooted in our infrastructure, impacting all our integrations significantly.
This issue is particularly noticeable for iCloud+ subscribers using iOS 14, as they encounter it upon enabling a specific feature. Itâs important to note that this isnât an isolated case; the release from Apple has similarly affected numerous major applications. To address this, weâve been in close communication with the AWS team and have identified several potential workarounds.
Rest assured, weâre actively implementing fixes and will keep you updated with progress, aiming to resolve this as soon as possible.