Getting "Java heap space" error with Selenium 3.0.1

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Getting "Java heap space" error with Selenium 3.0.1

Pragnya Sahoo

Hi All,

I'm using Selenium 3.0.1 with Firefox version 50 on Win 7.
So, when I'm running the below lines of code

System.setProperty("webdriver.gecko.driver", "D:\\Selenium\\geckodriver-v0.11.1-win64\\geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile fp = profile.getProfile("Selenium");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, fp);
WebDriver driver = new FirefoxDriver(dc);
driver.get("http://www.google.com");



getting the below error:

[GFX1-]: CreateShaderResourceView failed for format87
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
    at java.lang.AbstractStringBuilder.append(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at java.io.StringWriter.write(Unknown Source)
    at com.google.gson.stream.JsonWriter.string(JsonWriter.java:559)
    at com.google.gson.stream.JsonWriter.writeDeferredName(JsonWriter.java:402)
    at com.google.gson.stream.JsonWriter.value(JsonWriter.java:495)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:686)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:704)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:642)
    at com.google.gson.internal.Streams.write(Streams.java:68)
    at com.google.gson.JsonElement.toString(JsonElement.java:324)
    at java.lang.String.valueOf(Unknown Source)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:92)
    at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:343)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:217)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:46)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
    at TestPage.main(TestPage.java:18)



NOTE: But when I had previously ran the test with Selenium 2.53.1 (when gecko driver was not there) along with same firefox profile as stated above in the code, it was running fine.

Please help me in solving this issue.


Thanks in Advance
Pragnya Sahoo

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting "Java heap space" error with Selenium 3.0.1

⇜Krishnan Mahadevan⇝
Your code is failing because your profile size is very huge. If you look at the stacktrace you would notice that the failure begins from createSession() which is where your profile gets serialized and the failure seems to arise from there.

Please check your profile size and get rid of things that you perhaps may not be needing.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Dec 27, 2016 at 1:01 PM, Pragnya Sahoo <[hidden email]> wrote:

Hi All,

I'm using Selenium 3.0.1 with Firefox version 50 on Win 7.
So, when I'm running the below lines of code

System.setProperty("webdriver.gecko.driver", "D:\\Selenium\\geckodriver-v0.11.1-win64\\geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile fp = profile.getProfile("Selenium");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, fp);
WebDriver driver = new FirefoxDriver(dc);
driver.get("http://www.google.com");



getting the below error:

[GFX1-]: CreateShaderResourceView failed for format87
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
    at java.lang.AbstractStringBuilder.append(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at java.io.StringWriter.write(Unknown Source)
    at com.google.gson.stream.JsonWriter.string(JsonWriter.java:559)
    at com.google.gson.stream.JsonWriter.writeDeferredName(JsonWriter.java:402)
    at com.google.gson.stream.JsonWriter.value(JsonWriter.java:495)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:686)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:704)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:642)
    at com.google.gson.internal.Streams.write(Streams.java:68)
    at com.google.gson.JsonElement.toString(JsonElement.java:324)
    at java.lang.String.valueOf(Unknown Source)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:92)
    at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:343)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:217)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:46)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
    at TestPage.main(TestPage.java:18)



NOTE: But when I had previously ran the test with Selenium 2.53.1 (when gecko driver was not there) along with same firefox profile as stated above in the code, it was running fine.

Please help me in solving this issue.


Thanks in Advance
Pragnya Sahoo

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnqi_MvPRchXbEpNMt07tXqg%2B-MyCWk%2B5nWKzdjkdSyNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting "Java heap space" error with Selenium 3.0.1

Pragnya Sahoo
Thanks Krishnan for the reply... It worked after I removed some files.

But just want to know, is there any new changes as part Selenium 3.0.1 related to FirefoxProfile because as I had mentioned earlier I was able to run with same profile with Selenium 2.53.1 without deleting any files ?


Thanks & Regards
Pragnya Sahoo

On Tuesday, December 27, 2016 at 1:21:59 PM UTC+5:30, Krishnan wrote:
Your code is failing because your profile size is very huge. If you look at the stacktrace you would notice that the failure begins from createSession() which is where your profile gets serialized and the failure seems to arise from there.

Please check your profile size and get rid of things that you perhaps may not be needing.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/
My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

On Tue, Dec 27, 2016 at 1:01 PM, Pragnya Sahoo <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="4YyI3XstEgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pup...@...> wrote:

Hi All,

I'm using Selenium 3.0.1 with Firefox version 50 on Win 7.
So, when I'm running the below lines of code

System.setProperty("webdriver.gecko.driver", "D:\\Selenium\\geckodriver-v0.11.1-win64\\geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile fp = profile.getProfile("Selenium");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, fp);
WebDriver driver = new FirefoxDriver(dc);
driver.get("<a href="http://www.google.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com&#39;;return true;" onclick="this.href=&#39;http://www.google.com&#39;;return true;">http://www.google.com");



getting the below error:

[GFX1-]: CreateShaderResourceView failed for format87
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
    at java.lang.AbstractStringBuilder.append(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at java.io.StringWriter.write(Unknown Source)
    at com.google.gson.stream.JsonWriter.string(JsonWriter.java:559)
    at com.google.gson.stream.JsonWriter.writeDeferredName(JsonWriter.java:402)
    at com.google.gson.stream.JsonWriter.value(JsonWriter.java:495)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:686)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:704)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:642)
    at com.google.gson.internal.Streams.write(Streams.java:68)
    at com.google.gson.JsonElement.toString(JsonElement.java:324)
    at java.lang.String.valueOf(Unknown Source)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:92)
    at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:343)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:217)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:46)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
    at TestPage.main(TestPage.java:18)



NOTE: But when I had previously ran the test with Selenium 2.53.1 (when gecko driver was not there) along with same firefox profile as stated above in the code, it was running fine.

Please help me in solving this issue.


Thanks in Advance
Pragnya Sahoo

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="4YyI3XstEgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="4YyI3XstEgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b8bf16ec-6600-4a28-9ba4-8ef5195a80cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting "Java heap space" error with Selenium 3.0.1

⇜Krishnan Mahadevan⇝
I am not sure if there were any changes related to serialising profile data (I doubt if there were any). You may have to sift through GitHub commit history or look at the change history of the relevant classes (FirefoxDriver and FirefoxProfile) to figure out if there were any.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Dec 27, 2016 at 1:47 PM, Pragnya Sahoo <[hidden email]> wrote:
Thanks Krishnan for the reply... It worked after I removed some files.

But just want to know, is there any new changes as part Selenium 3.0.1 related to FirefoxProfile because as I had mentioned earlier I was able to run with same profile with Selenium 2.53.1 without deleting any files ?


Thanks & Regards
Pragnya Sahoo

On Tuesday, December 27, 2016 at 1:21:59 PM UTC+5:30, Krishnan wrote:
Your code is failing because your profile size is very huge. If you look at the stacktrace you would notice that the failure begins from createSession() which is where your profile gets serialized and the failure seems to arise from there.

Please check your profile size and get rid of things that you perhaps may not be needing.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Dec 27, 2016 at 1:01 PM, Pragnya Sahoo <[hidden email]> wrote:

Hi All,

I'm using Selenium 3.0.1 with Firefox version 50 on Win 7.
So, when I'm running the below lines of code

System.setProperty("webdriver.gecko.driver", "D:\\Selenium\\geckodriver-v0.11.1-win64\\geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile fp = profile.getProfile("Selenium");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, fp);
WebDriver driver = new FirefoxDriver(dc);
driver.get("http://www.google.com");



getting the below error:

[GFX1-]: CreateShaderResourceView failed for format87
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
    at java.lang.AbstractStringBuilder.append(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at java.io.StringWriter.write(Unknown Source)
    at com.google.gson.stream.JsonWriter.string(JsonWriter.java:559)
    at com.google.gson.stream.JsonWriter.writeDeferredName(JsonWriter.java:402)
    at com.google.gson.stream.JsonWriter.value(JsonWriter.java:495)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:686)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:704)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:642)
    at com.google.gson.internal.Streams.write(Streams.java:68)
    at com.google.gson.JsonElement.toString(JsonElement.java:324)
    at java.lang.String.valueOf(Unknown Source)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:92)
    at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:343)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:217)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:46)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
    at TestPage.main(TestPage.java:18)



NOTE: But when I had previously ran the test with Selenium 2.53.1 (when gecko driver was not there) along with same firefox profile as stated above in the code, it was running fine.

Please help me in solving this issue.


Thanks in Advance
Pragnya Sahoo

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b8bf16ec-6600-4a28-9ba4-8ef5195a80cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZL%3DThrMnmLjYpgB_--5NQOZTVZ1WNwk7Ro73sWX3qRbfzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting "Java heap space" error with Selenium 3.0.1

sushil bajaj
In reply to this post by Pragnya Sahoo
Hi Pragnya,

i am getting the same heap size error. can you please tell me which files u removed which helped you...

kindly share the information soon.

Thanks & Regards
Sushil Bajaj

On Tuesday, 27 December 2016 13:47:12 UTC+5:30, Pragnya Sahoo wrote:
Thanks Krishnan for the reply... It worked after I removed some files.

But just want to know, is there any new changes as part Selenium 3.0.1 related to FirefoxProfile because as I had mentioned earlier I was able to run with same profile with Selenium 2.53.1 without deleting any files ?


Thanks & Regards
Pragnya Sahoo

On Tuesday, December 27, 2016 at 1:21:59 PM UTC+5:30, Krishnan wrote:
Your code is failing because your profile size is very huge. If you look at the stacktrace you would notice that the failure begins from createSession() which is where your profile gets serialized and the failure seems to arise from there.

Please check your profile size and get rid of things that you perhaps may not be needing.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/
My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

On Tue, Dec 27, 2016 at 1:01 PM, Pragnya Sahoo <[hidden email]> wrote:

Hi All,

I'm using Selenium 3.0.1 with Firefox version 50 on Win 7.
So, when I'm running the below lines of code

System.setProperty("webdriver.gecko.driver", "D:\\Selenium\\geckodriver-v0.11.1-win64\\geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile fp = profile.getProfile("Selenium");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, fp);
WebDriver driver = new FirefoxDriver(dc);
driver.get("<a href="http://www.google.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com&#39;;return true;" onclick="this.href=&#39;http://www.google.com&#39;;return true;">http://www.google.com");



getting the below error:

[GFX1-]: CreateShaderResourceView failed for format87
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
    at java.lang.AbstractStringBuilder.append(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at java.io.StringWriter.write(Unknown Source)
    at com.google.gson.stream.JsonWriter.string(JsonWriter.java:559)
    at com.google.gson.stream.JsonWriter.writeDeferredName(JsonWriter.java:402)
    at com.google.gson.stream.JsonWriter.value(JsonWriter.java:495)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:686)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:704)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:642)
    at com.google.gson.internal.Streams.write(Streams.java:68)
    at com.google.gson.JsonElement.toString(JsonElement.java:324)
    at java.lang.String.valueOf(Unknown Source)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:92)
    at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:343)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:217)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:46)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
    at TestPage.main(TestPage.java:18)



NOTE: But when I had previously ran the test with Selenium 2.53.1 (when gecko driver was not there) along with same firefox profile as stated above in the code, it was running fine.

Please help me in solving this issue.


Thanks in Advance
Pragnya Sahoo

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4d0781fe-0a47-4768-bce5-92ee0be71d82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting "Java heap space" error with Selenium 3.0.1

⇜Krishnan Mahadevan⇝

What are you doing to trigger the heap space error ? Can you please help call that out ?

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of sushil bajaj <[hidden email]>
Reply-To: <[hidden email]>
Date: Thursday, June 1, 2017 at 11:22 AM
To: Selenium Users <[hidden email]>
Subject: Re: [selenium-users] Getting "Java heap space" error with Selenium 3.0.1

 

Hi Pragnya,

 

i am getting the same heap size error. can you please tell me which files u removed which helped you...

 

kindly share the information soon.

 

Thanks & Regards

Sushil Bajaj

On Tuesday, 27 December 2016 13:47:12 UTC+5:30, Pragnya Sahoo wrote:

Thanks Krishnan for the reply... It worked after I removed some files.

But just want to know, is there any new changes as part Selenium 3.0.1 related to FirefoxProfile because as I had mentioned earlier I was able to run with same profile with Selenium 2.53.1 without deleting any files ?


Thanks & Regards
Pragnya Sahoo

On Tuesday, December 27, 2016 at 1:21:59 PM UTC+5:30, Krishnan wrote:

Your code is failing because your profile size is very huge. If you look at the stacktrace you would notice that the failure begins from createSession() which is where your profile gets serialized and the failure seems to arise from there.

 

Please check your profile size and get rid of things that you perhaps may not be needing.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

On Tue, Dec 27, 2016 at 1:01 PM, Pragnya Sahoo <[hidden email]> wrote:


Hi All,

I'm using Selenium 3.0.1 with Firefox version 50 on Win 7.
So, when I'm running the below lines of code

System.setProperty("webdriver.gecko.driver", "D:\\Selenium\\geckodriver-v0.11.1-win64\\geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile fp = profile.getProfile("Selenium");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, fp);
WebDriver driver = new FirefoxDriver(dc);
driver.get("http://www.google.com");



getting the below error:

[GFX1-]: CreateShaderResourceView failed for format87
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
    at java.lang.AbstractStringBuilder.append(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at java.io.StringWriter.write(Unknown Source)
    at com.google.gson.stream.JsonWriter.string(JsonWriter.java:559)
    at com.google.gson.stream.JsonWriter.writeDeferredName(JsonWriter.java:402)
    at com.google.gson.stream.JsonWriter.value(JsonWriter.java:495)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:686)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:704)
    at com.google.gson.internal.bind.TypeAdapters$25.write(TypeAdapters.java:642)
    at com.google.gson.internal.Streams.write(Streams.java:68)
    at com.google.gson.JsonElement.toString(JsonElement.java:324)
    at java.lang.String.valueOf(Unknown Source)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:92)
    at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:343)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:217)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:46)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
    at TestPage.main(TestPage.java:18)



NOTE: But when I had previously ran the test with Selenium 2.53.1 (when gecko driver was not there) along with same firefox profile as stated above in the code, it was running fine.

Please help me in solving this issue.


Thanks in Advance
Pragnya Sahoo

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9bfaf8dc-bdc1-4744-ab7a-9d039ec8e0af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4d0781fe-0a47-4768-bce5-92ee0be71d82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/EC0C1BF4-3D6C-40C1-8099-33EB29256337%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...