OpenBankProject / OpenBankProject/OBP-API

code.api.OAuthTest failure

Open
#931 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
482
Avg merge
1d 12h
Merged PRs (30d)
15

Description

Hello team,
While running mvn package some of the Outh testcases failed with the following failure exceptions:

<testcase name="Feature: access token Scenario: we get an access token with a callback" classname="code.api.OAuthTest" time="0.899"> <failure message="An Failure Box was opened. Failure Message: Element '//div[@id='verifier']' not found.. The justification for allowing the openOrThrowException was Legacy method implementation" type="class net.liftweb.common.Failure$$anon$1"> net.liftweb.common.Failure$$anon$1: An Failure Box was opened. Failure Message: Element '//div[@id='verifier']' not found.. The justification for allowing the openOrThrowException was Legacy method implementation at net.liftweb.common.Failure.openOrThrowException(Box.scala:757) at net.liftweb.common.Failure.openOrThrowException(Box.scala:726) at net.liftweb.common.Box.open_$bang(Box.scala:291) at net.liftweb.common.Box.get(Box.scala:302) at code.api.OAuthTest$$anonfun$3$$anonfun$apply$mcV$sp$11.apply$mcV$sp(oauthTest.scala:285) at code.api.OAuthTest$$anonfun$3$$anonfun$apply$mcV$sp$11.apply(oauthTest.scala:279) at code.api.OAuthTest$$anonfun$3$$anonfun$apply$mcV$sp$11.apply(oauthTest.scala:279) at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) at org.scalatest.Transformer.apply(Transformer.scala:22) at org.scalatest.Transformer.apply(Transformer.scala:20) at org.scalatest.FeatureSpecLike$$anon$1.apply(FeatureSpecLike.scala:199) at org.scalatest.Suite$class.withFixture(Suite.scala:1122) at org.scalatest.FeatureSpec.withFixture(FeatureSpec.scala:1836) at org.scalatest.FeatureSpecLike$class.invokeWithFixture$1(FeatureSpecLike.scala:196) at org.scalatest.FeatureSpecLike$$anonfun$runTest$1.apply(FeatureSpecLike.scala:208) at org.scalatest.FeatureSpecLike$$anonfun$runTest$1.apply(FeatureSpecLike.scala:208) at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) at org.scalatest.FeatureSpecLike$class.runTest(FeatureSpecLike.scala:208) at code.api.OAuthTest.org$scalatest$BeforeAndAfterEach$$super$runTest(oauthTest.scala:62) at org.scalatest.BeforeAndAfterEach$class.runTest(BeforeAndAfterEach.scala:255) at code.api.OAuthTest.runTest(oauthTest.scala:62) at org.scalatest.FeatureSpecLike$$anonfun$runTests$1.apply(FeatureSpecLike.scala:267) at org.scalatest.FeatureSpecLike$$anonfun$runTests$1.apply(FeatureSpecLike.scala:267) at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) at scala.collection.immutable.List.foreach(List.scala:381) at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:390) at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:427) at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) at scala.collection.immutable.List.foreach(List.scala:381) at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) at org.scalatest.FeatureSpecLike$class.runTests(FeatureSpecLike.scala:267) at org.scalatest.FeatureSpec.runTests(FeatureSpec.scala:1836) at org.scalatest.Suite$class.run(Suite.scala:1424) at org.scalatest.FeatureSpec.org$scalatest$FeatureSpecLike$$super$run(FeatureSpec.scala:1836) at org.scalatest.FeatureSpecLike$$anonfun$run$1.apply(FeatureSpecLike.scala:309) at org.scalatest.FeatureSpecLike$$anonfun$run$1.apply(FeatureSpecLike.scala:309) at org.scalatest.SuperEngine.runImpl(Engine.scala:545) at org.scalatest.FeatureSpecLike$class.run(FeatureSpecLike.scala:309) at code.api.OAuthTest.org$scalatest$BeforeAndAfterAll$$super$run(oauthTest.scala:62) at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257) at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256) at code.api.OAuthTest.run(oauthTest.scala:62) at org.scalatest.Suite$class.callExecuteOnSuite$1(Suite.scala:1492) at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1528) at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1526) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at org.scalatest.Suite$class.runNestedSuites(Suite.scala:1526) at org.scalatest.tools.DiscoverySuite.runNestedSuites(DiscoverySuite.scala:29) at org.scalatest.Suite$class.run(Suite.scala:1421) at org.scalatest.tools.DiscoverySuite.run(DiscoverySuite.scala:29) at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:55) at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2563) at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2557) at scala.collection.immutable.List.foreach(List.scala:381) at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2557) at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1044) at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1043) at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:2722) at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1043) at org.scalatest.tools.Runner$.main(Runner.scala:860) at org.scalatest.tools.Runner.main(Runner.scala) Cause: org.scalatest.exceptions.TestFailedException: Element '//div[@id='verifier']' not found. at org.scalatest.selenium.WebBrowser$Query$class.element(WebBrowser.scala:2808) at org.scalatest.selenium.WebBrowser$XPathQuery.element(WebBrowser.scala:2926) at code.api.OAuthTest$Browser$$anonfun$getVerifier$1.apply(oauthTest.scala:161) at code.api.OAuthTest$Browser$$anonfun$getVerifier$1.apply(oauthTest.scala:133) at net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:46) at net.liftweb.util.Helpers$.tryo(Helpers.scala:34) at net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:84) at net.liftweb.util.Helpers$.tryo(Helpers.scala:34) at code.api.OAuthTest$Browser.getVerifier(oauthTest.scala:133) at code.api.OAuthTest.getVerifier(oauthTest.scala:173) at code.api.OAuthTest$$anonfun$3$$anonfun$apply$mcV$sp$11.apply$mcV$sp(oauthTest.scala:283) at code.api.OAuthTest$$anonfun$3$$anonfun$apply$mcV$sp$11.apply(oauthTest.scala:279) at code.api.OAuthTest$$anonfun$3$$anonfun$apply$mcV$sp$11.apply(oauthTest.scala:279) at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) at org.scalatest.Transformer.apply(Transformer.scala:22) at org.scalatest.Transformer.apply(Transformer.scala:20) at org.scalatest.FeatureSpecLike$$anon$1.apply(FeatureSpecLike.scala:199) at org.scalatest.Suite$class.withFixture(Suite.scala:1122) at org.scalatest.FeatureSpec.withFixture(FeatureSpec.scala:1836) at org.scalatest.FeatureSpecLike$class.invokeWithFixture$1(FeatureSpecLike.scala:196) at org.scalatest.FeatureSpecLike$$anonfun$runTest$1.apply(FeatureSpecLike.scala:208) at org.scalatest.FeatureSpecLike$$anonfun$runTest$1.apply(FeatureSpecLike.scala:208) at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) at org.scalatest.FeatureSpecLike$class.runTest(FeatureSpecLike.scala:208) at code.api.OAuthTest.org$scalatest$BeforeAndAfterEach$$super$runTest(oauthTest.scala:62) at org.scalatest.BeforeAndAfterEach$class.runTest(BeforeAndAfterEach.scala:255) at code.api.OAuthTest.runTest(oauthTest.scala:62) at org.scalatest.FeatureSpecLike$$anonfun$runTests$1.apply(FeatureSpecLike.scala:267) at org.scalatest.FeatureSpecLike$$anonfun$runTests$1.apply(FeatureSpecLike.scala:267) at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) at scala.collection.immutable.List.foreach(List.scala:381) at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:390) at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:427) at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) at scala.collection.immutable.List.foreach(List.scala:381) at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) at org.scalatest.FeatureSpecLike$class.runTests(FeatureSpecLike.scala:267) at org.scalatest.FeatureSpec.runTests(FeatureSpec.scala:1836) at org.scalatest.Suite$class.run(Suite.scala:1424) at org.scalatest.FeatureSpec.org$scalatest$FeatureSpecLike$$super$run(FeatureSpec.scala:1836) at org.scalatest.FeatureSpecLike$$anonfun$run$1.apply(FeatureSpecLike.scala:309) at org.scalatest.FeatureSpecLike$$anonfun$run$1.apply(FeatureSpecLike.scala:309) at org.scalatest.SuperEngine.runImpl(Engine.scala:545) at org.scalatest.FeatureSpecLike$class.run(FeatureSpecLike.scala:309) at code.api.OAuthTest.org$scalatest$BeforeAndAfterAll$$super$run(oauthTest.scala:62) at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257) at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256) at code.api.OAuthTest.run(oauthTest.scala:62) at org.scalatest.Suite$class.callExecuteOnSuite$1(Suite.scala:1492) at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1528) at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1526) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at org.scalatest.Suite$class.runNestedSuites(Suite.scala:1526) at org.scalatest.tools.DiscoverySuite.runNestedSuites(DiscoverySuite.scala:29) at org.scalatest.Suite$class.run(Suite.scala:1421) at org.scalatest.tools.DiscoverySuite.run(DiscoverySuite.scala:29) at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:55) at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2563) at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2557) at scala.collection.immutable.List.foreach(List.scala:381) at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2557) at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1044) at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1043) at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:2722) at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1043) at org.scalatest.tools.Runner$.main(Runner.scala:860) at org.scalatest.tools.Runner.main(Runner.scala) Cause: org.openqa.selenium.NoSuchElementException: Unable to locate a node using //div[@id='verifier']

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with oauthTest.scala, especially getVerifier and the failing scenario around lines 161-285, then run mvn package to reproduce the code.api.OAuthTest failure. Investigate why the browser test cannot find the //div[@id='verifier'] element; done means the OAuth callback scenario passes without that failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, authentication, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.