It seems LIFF API outage.
- 0
When I try to get friendship status and if 'friendFlag === false' then redirect to add friend page sometime it catch and return object Error{} this error occur 20/03/2021, I think this project finished around 10/2020 It never happend before
This only happen in LINE android not Desktop (not sure about IOS) Error{}
initLiff = async (decodedToken) => { console.log('initLiff') if (decodedToken.liffId) { try { await liff.init({ liffId: decodedToken.liffId })
const error = this.props.error
if (error === 'access_denied') {
liff.closeWindow()
}
if (error) {
console.log('initLiff error')
return this.setState({ isError: true })
}
const isLoggedIn = liff.isLoggedIn()
console.log('isLoggedIn', isLoggedIn)
if (!isLoggedIn) {
return this.redirectLogin()
}
// this is where error happend
const isFriend = await liff.getFriendship()
if (!isFriend.friendFlag) {
return this.redirectLogin()
}
this.getAccessToken(decodedToken)
} catch (e) {
this.setState({ isError: true })
}
} else {
this.setState({ isError: true })
}
}
originally I use @line/liff 2.4.1 and I upgrade to 2.8.1 It won't help
if I remove liff.getFriendship() completely error never occur
I console.log and try to remove everything at a time still don't get anything useful So I think cause by liff.getFriendship()
@line/liff 2.4.1
web develop with preact-cli 3.0.0
System: Android 9 UA: Mozilla/5.0 (Linux; Android 9; Redmi Note 6 Pro Build/PKQ1.180904.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.105 Mobile Safari/537.36 Line/11.4.1 LIFF
It seems LIFF API outage.
関連する質問
Android SDK Line login failed: Illegal parameter value of ‘state’
Number of Audience count created is different from number of audience count in job.
Error when building LineMessagingClient ( Local server running on Docker)
How to become corporate user to use IFA to add to audiences using messaging API?
Feeding LINE Bot with text from outside and send Push Message to user with a 400 bad request?