{"action":"created","issue":{"url":"https://api.github.com/repos/sterodium/selenium-grid-extensions/issues/43","repository_url":"https://api.github.com/repos/sterodium/selenium-grid-extensions","labels_url":"https://api.github.com/repos/sterodium/selenium-grid-extensions/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/sterodium/selenium-grid-extensions/issues/43/comments","events_url":"https://api.github.com/repos/sterodium/selenium-grid-extensions/issues/43/events","html_url":"https://github.com/sterodium/selenium-grid-extensions/issues/43","id":144615574,"number":43,"title":"Error: <title>Error 403 Forbidden for Proxy</title>","user":{"login":"Anishohri","id":5686132,"avatar_url":"https://avatars.githubusercontent.com/u/5686132?v=3","gravatar_id":"","url":"https://api.github.com/users/Anishohri","html_url":"https://github.com/Anishohri","followers_url":"https://api.github.com/users/Anishohri/followers","following_url":"https://api.github.com/users/Anishohri/following{/other_user}","gists_url":"https://api.github.com/users/Anishohri/gists{/gist_id}","starred_url":"https://api.github.com/users/Anishohri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anishohri/subscriptions","organizations_url":"https://api.github.com/users/Anishohri/orgs","repos_url":"https://api.github.com/users/Anishohri/repos","events_url":"https://api.github.com/users/Anishohri/events{/privacy}","received_events_url":"https://api.github.com/users/Anishohri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-30T14:46:04Z","updated_at":"2016-03-30T16:08:42Z","closed_at":null,"body":"Hi\r\n\r\nAny help on this would be greatly appreciated.\r\n\r\nI am trying to work with sikuli and selenium Grid. did all the configuration etc and when i run i get 403 forbidden error (complete error logs below):\r\n io.sterodium.rmi.protocol.server.TargetServerException: Widget target-factory invocation failed (expected 200, but was 403): <html>\r\n<head>\r\n<title>Error 403 Forbidden for Proxy</title>\r\n</head>\r\n<body>\r\n<h2>HTTP ERROR: 403</h2><pre>Forbidden for Proxy</pre>\r\n<p>RequestURI=/grid/admin/HubRequestsProxyingServlet/session/57d73f94-f7ad-499a-9c1d-45992494af54/SikuliExtensionServlet/target-factory</p>\r\n<p><i><small><a href=\"http://jetty.mortbay.org\">Powered by Jetty://</a></small></i></p>\r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n                                                \r\n</body>\r\n</html>\r\n\r\n\tat io.sterodium.rmi.protocol.client.RestTransport.send(RestTransport.java:49)\r\n\tat io.sterodium.rmi.protocol.client.RestClient.invoke(RestClient.java:40)\r\n\tat io.sterodium.rmi.protocol.client.RemoteInvoker.invoke(RemoteInvoker.java:36)\r\n\tat io.sterodium.rmi.protocol.client.RemoteObjectMethodInterceptor.invoke(RemoteObjectMethodInterceptor.java:69)\r\n\tat io.sterodium.rmi.protocol.client.RemoteObjectMethodInterceptor.intercept(RemoteObjectMethodInterceptor.java:51)\r\n\tat io.sterodium.extensions.node.rmi.TargetFactory$$EnhancerByCGLIB$$3278f426.createImageTarget(<generated>)\r\n\tat com.newdemo.test.paam.sikuliremote.searchGoogleForSikuliLogo(sikuliremote.java:69)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\r\n\tat org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)\r\n\tat org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)\r\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\r\n\tat org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)\r\n\tat org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)\r\n\r\n\r\nThis is the my class:\r\npackage com.newdemo.test.paam;\r\n\r\n\r\n\r\nimport com.codeborne.selenide.WebDriverRunner;\r\n\r\nimport io.sterodium.extensions.client.SikuliExtensionClient;\r\nimport io.sterodium.extensions.node.rmi.TargetFactory;\r\n\r\n\r\n\r\n\r\nimport org.junit.After;\r\nimport org.junit.Before;\r\nimport org.junit.Test;\r\nimport org.openqa.selenium.Platform;\r\nimport org.openqa.selenium.remote.DesiredCapabilities;\r\nimport org.openqa.selenium.remote.RemoteWebDriver;\r\nimport org.sikuli.api.DesktopScreenRegion;\r\nimport org.sikuli.api.ImageTarget;\r\nimport org.sikuli.api.ScreenRegion;\r\nimport org.sikuli.api.robot.Mouse;\r\n\r\nimport java.net.MalformedURLException;\r\nimport java.net.URL;\r\n\r\nimport static com.codeborne.selenide.Selenide.open;\r\n\r\npublic class sikuliremote {\r\n\r\n    private static final String GOOGLE_IMAGES_BUNDLE = \"/Users/anish_ohri/Desktop/image.png\";\r\n    private static final String GOOGLE_IMAGES_URL = \"https://images.google.com/\";\r\n    private static final String SIKULI_LOGO_SEARCH = \"sikuli logo\";\r\n\r\n    private static final String SEARCH_FIELD_IMG = \"search_field.png\";\r\n    private static final String SEARCH_BUTTON_IMG = \"search_button.png\";\r\n    private static final String SIKULI_LOGO_IMG = \"sikuli_logo.png\";\r\n\r\n\r\n    @Before\r\n    public void setUp() throws MalformedURLException {\r\n        DesiredCapabilities desiredCapabilities = firefoxWithSikuli();\r\n        URL url = new URL(String.format(\"http://%s:%d/wd/hub\", GridSettings.HOST, GridSettings.PORT));\r\n\r\n        RemoteWebDriver remoteWebDriver = new RemoteWebDriver(url, desiredCapabilities);\r\n        WebDriverRunner.setWebDriver(remoteWebDriver);\r\n    }\r\n\r\n    @After\r\n    public void tearDown() {\r\n        WebDriverRunner.closeWebDriver();\r\n    }\r\n\r\n    private DesiredCapabilities firefoxWithSikuli() {\r\n        DesiredCapabilities desiredCapabilities = new DesiredCapabilities();\r\n        desiredCapabilities.setBrowserName(\"firefox\");\r\n        desiredCapabilities.setPlatform(Platform.ANY);\r\n        desiredCapabilities.setCapability(\"sikuliExtension\", true);\r\n        return desiredCapabilities;\r\n    }\r\n\r\n    @Test\r\n    public void searchGoogleForSikuliLogo() throws InterruptedException {\r\n        open(\"http://google.com\");\r\n\r\n        String sessionId = getSessionId();\r\n        SikuliExtensionClient sikuliExtensionClient = new SikuliExtensionClient(GridSettings.HOST, GridSettings.PORT, sessionId);\r\n        TargetFactory targetFactory = sikuliExtensionClient.getTargetFactory();\r\n        ImageTarget imageTarget = targetFactory.createImageTarget(\"/Users/anish_ohri/Desktop/image.png\");\r\n\r\n        DesktopScreenRegion desktop = sikuliExtensionClient.getDesktop();\r\n        ScreenRegion screenRegion = desktop.find(imageTarget);\r\n\r\n        Mouse mouse = sikuliExtensionClient.getMouse();\r\n        mouse.click(screenRegion.getCenter());\r\n\r\n     //   SikuliExtensionClient sikuliExtensionClient = new SikuliExtensionClient(HOST, PORT, sessionId);\r\n       // sikuliExtensionClient.uploadResourceBundle(GOOGLE_IMAGES_BUNDLE);\r\n        //SikuliHelper sikuliHelper = new SikuliHelper(sikuliExtensionClient);\r\n\r\n        \r\n       \r\n    }\r\n\r\n    private String getSessionId() {\r\n        return ((RemoteWebDriver) WebDriverRunner.getWebDriver()).getSessionId().toString();\r\n    }\r\n}"},"comment":{"url":"https://api.github.com/repos/sterodium/selenium-grid-extensions/issues/comments/203506340","html_url":"https://github.com/sterodium/selenium-grid-extensions/issues/43#issuecomment-203506340","issue_url":"https://api.github.com/repos/sterodium/selenium-grid-extensions/issues/43","id":203506340,"user":{"login":"Anishohri","id":5686132,"avatar_url":"https://avatars.githubusercontent.com/u/5686132?v=3","gravatar_id":"","url":"https://api.github.com/users/Anishohri","html_url":"https://github.com/Anishohri","followers_url":"https://api.github.com/users/Anishohri/followers","following_url":"https://api.github.com/users/Anishohri/following{/other_user}","gists_url":"https://api.github.com/users/Anishohri/gists{/gist_id}","starred_url":"https://api.github.com/users/Anishohri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anishohri/subscriptions","organizations_url":"https://api.github.com/users/Anishohri/orgs","repos_url":"https://api.github.com/users/Anishohri/repos","events_url":"https://api.github.com/users/Anishohri/events{/privacy}","received_events_url":"https://api.github.com/users/Anishohri/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T16:08:42Z","updated_at":"2016-03-30T16:08:42Z","body":"Yes.\r\n\r\nI did that configuration in my NodeConfig.json\r\n\r\n{\r\n  \"configuration\":\r\n  {\r\n    \"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",\r\n\"extension.sikuliCapability\": true,\r\n    \"maxSession\": 5,\r\n    \"port\": 5572,\r\n    \"host\": 10.222.93.126,\r\n    \"register\": true,\r\n    \"registerCycle\": 5000,\r\n    \"hubPort\": 4433,\r\n    \"hubHost\": 10.222.93.126,\r\n\t\"servlets\":\"io.sterodium.extensions.node.SikuliExtensionServlet,io.sterodium.extensions.node.upload.FileUploadServlet,io.sterodium.extensions.node.download.FileDownloadServlet\"\r\n  }\r\n}"}}