Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Update play-googleauth to v4.0.0 #414

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

akash1810
Copy link
Member

@akash1810 akash1810 commented Mar 14, 2024

What is the purpose of this change?

This fixes an issue with the locale field in Google's response during the login process.

The observed error is:

play.api.libs.json.JsResultException: JsResultException(errors:List((/locale,List(JsonValidationError(List(error.path.missing),List())))))
	at play.api.libs.json.JsReadable.$anonfun$as$2(JsReadable.scala:25)
	at play.api.libs.json.JsError.fold(JsResult.scala:66)
	at play.api.libs.json.JsReadable.as(JsReadable.scala:24)
	at play.api.libs.json.JsReadable.as$(JsReadable.scala:23)
	at play.api.libs.json.JsObject.as(JsValue.scala:116)
	at com.gu.googleauth.UserInfo$.fromJson(model.scala:41)
	at com.gu.googleauth.GoogleAuth$.$anonfun$validatedUserIdentity$6(auth.scala:242)
	at com.gu.googleauth.GoogleAuth$.googleResponse(auth.scala:182)
	at com.gu.googleauth.GoogleAuth$.$anonfun$validatedUserIdentity$5(auth.scala:241)
	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:467)
	at org.apache.pekko.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:73)
	at org.apache.pekko.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:110)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)
	at org.apache.pekko.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:110)
	at org.apache.pekko.dispatch.TaskInvocation.run(AbstractDispatcher.scala:59)
	at org.apache.pekko.dispatch.ForkJoinExecutorConfigurator$PekkoForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:57)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

What is the value of this change and how do we measure success?

More reliable login experience.

This fixes an issue with the `locale` field in Google's response.

The observed error is:

```log
play.api.libs.json.JsResultException: JsResultException(errors:List((/locale,List(JsonValidationError(List(error.path.missing),List())))))
	at play.api.libs.json.JsReadable.$anonfun$as$2(JsReadable.scala:25)
	at play.api.libs.json.JsError.fold(JsResult.scala:66)
	at play.api.libs.json.JsReadable.as(JsReadable.scala:24)
	at play.api.libs.json.JsReadable.as$(JsReadable.scala:23)
	at play.api.libs.json.JsObject.as(JsValue.scala:116)
	at com.gu.googleauth.UserInfo$.fromJson(model.scala:41)
	at com.gu.googleauth.GoogleAuth$.$anonfun$validatedUserIdentity$6(auth.scala:242)
	at com.gu.googleauth.GoogleAuth$.googleResponse(auth.scala:182)
	at com.gu.googleauth.GoogleAuth$.$anonfun$validatedUserIdentity$5(auth.scala:241)
	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:467)
	at org.apache.pekko.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:73)
	at org.apache.pekko.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:110)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)
	at org.apache.pekko.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:110)
	at org.apache.pekko.dispatch.TaskInvocation.run(AbstractDispatcher.scala:59)
	at org.apache.pekko.dispatch.ForkJoinExecutorConfigurator$PekkoForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:57)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
```
@akash1810 akash1810 merged commit 6f9a239 into main Mar 14, 2024
3 checks passed
@akash1810 akash1810 deleted the akash1810-patch-1 branch March 14, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants