우루르
우루르6mo ago

React Native 위젯 연동시 Warning이 발생합니다.

"@tosspayments/widget-sdk-react-native": "^1.3.0",
`<PaymentWidgetProvider
clientKey={TOSS_REAL_API_KEY}
customerKey={'DDF_dDF123sdDDD'}>`

` <PaymentMethodWidget
selector="payment-methods"
onLoadEnd={() => {
setTimeout(() => {
paymentWidgetControl
.renderPaymentMethods(
'payment-methods',
{value: price},
{
variantKey: 'DEFAULT',
},
)
.then(control => {
setPaymentMethodWidgetControl(control);
});
}, 0);
}}
/>`
"@tosspayments/widget-sdk-react-native": "^1.3.0",
`<PaymentWidgetProvider
clientKey={TOSS_REAL_API_KEY}
customerKey={'DDF_dDF123sdDDD'}>`

` <PaymentMethodWidget
selector="payment-methods"
onLoadEnd={() => {
setTimeout(() => {
paymentWidgetControl
.renderPaymentMethods(
'payment-methods',
{value: price},
{
variantKey: 'DEFAULT',
},
)
.then(control => {
setPaymentMethodWidgetControl(control);
});
}, 0);
}}
/>`
이렇게 사용중에 있는데, 토스 paymentMethodWidget 오픈시
Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=3, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: PaymentWidget, WKJavaScriptExceptionColumnNumber=33, WKJavaScriptExceptionSourceURL=about:blank, NSLocalizedDescription=A JavaScript exception occurred}
Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=3, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: PaymentWidget, WKJavaScriptExceptionColumnNumber=33, WKJavaScriptExceptionSourceURL=about:blank, NSLocalizedDescription=A JavaScript exception occurred}
위 에러가 계속해서 발생합니다. 해결방법이 있을까요?
8 Replies
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.
이실장
이실장6mo ago
정확히 어떤 에러인지는 모르겠네요
이실장
이실장6mo ago
GitHub
tosspayments-sample-v1/payment-widget/react-native at main · tosspa...
토스페이먼츠 SDK v1 샘플 프로젝트입니다. . Contribute to tosspayments/tosspayments-sample-v1 development by creating an account on GitHub.
이실장
이실장6mo ago
한번 실행해보셨나요?
우루르
우루르OP6mo ago
어떤걸 말씀하시는걸까요 ?? 앱에서 실행시에 제가 설정한 위젯은 잘 나오고, 결제까지 테스트가 가능하나,
WARN Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=3, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: PaymentWidget, WKJavaScriptExceptionColumnNumber=33, WKJavaScriptExceptionSourceURL=about:blank, NSLocalizedDescription=A JavaScript exception occurred}
WARN Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=3, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: PaymentWidget, WKJavaScriptExceptionColumnNumber=33, WKJavaScriptExceptionSourceURL=about:blank, NSLocalizedDescription=A JavaScript exception occurred}
PaymentMethodWidget가 랜더링 될때마다, 계속해서 이 Warning이 나옵니다.
이실장
이실장6mo ago
동작에는 이상없고 단순 warning인가요? 최신버전 1.3.4으로 한번 올려보시겠어요
우루르
우루르OP6mo ago
네 동작에는 이상이 없습니다. 하나 발생하는 문제는 신용카드무이자할부안내 클릭 후 뒤로가기를 터치했을때 이용약관말고는 사라지는 문제가 있습니다. 1.3.4 버전으로 올려 진행해보고 다시 말씀드리도록 하겠습니다 ! 1.3.4 버전으로 올렸으나
WARN Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=0, WKJavaScriptExceptionMessage=SyntaxError: Can't create duplicate variable: 'paymentMethodWidget', WKJavaScriptExceptionColumnNumber=0, NSLocalizedDescription=A JavaScript exception occurred}
WARN Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=0, WKJavaScriptExceptionMessage=SyntaxError: Can't create duplicate variable: 'paymentMethodWidget', WKJavaScriptExceptionColumnNumber=0, NSLocalizedDescription=A JavaScript exception occurred}
Warning이 사라지지 않았습니다... 다시한번더 빌드해보니 이제 발생하지 않는것 같네요.. ! 감사합니다!
토스페이먼츠 BOT
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.

Did you find this page helpful?