Getting attribute state failed on flavorelement error

Ranorex Spy, Recorder, and Studio.
fimo420
Posts: 55
Joined: Wed Jun 20, 2012 9:49 am

Getting attribute state failed on flavorelement error

Post by fimo420 » Mon Feb 24, 2014 12:37 pm

Hi,

I'm getting this weird error message suddenly on working tests, can anyone help me out here?
See the attachment for more detail.
These tests have been working fine before, now it is very random and stopped working.
I'm updated Ranorex to latest to see if it helps but with no luck.

/Feroz
Attachments
ranorex_error_flavorelemnt.JPG
ranorex_error_flavorelemnt.JPG (22.38 KiB) Viewed 1457 times

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Getting attribute state failed on flavorelement error

Post by krstcs » Mon Feb 24, 2014 2:47 pm

Did you update Firefox recently?

What version of Ranorex are you running?

What operating system/architecture are you running on?

Does the test report have any error messages and stack traces in it?

Can you post a snapshot of the SUT and the test report?
Shortcuts usually aren't...

fimo420
Posts: 55
Joined: Wed Jun 20, 2012 9:49 am

Re: Getting attribute state failed on flavorelement error

Post by fimo420 » Wed Feb 26, 2014 8:15 am

Hi,

Running the latest ranorex (4.1.5)
Havent updated firefox or anything it used to work fine...
64 bit windows
There is no stacktrace on the testreport, since it just waits with that message and doesnt do anything else, so i have to abort the test manually.
I noticed that it happens when my ranorex test restarts the browser and comes to a specific part of the test this issue starts.

I have a stacktrace from the ranorex Nlog.config file that generates:


2014-02-24 13:04:28.1070|DEBUG|Ranorex.Report|Plugins: Getting attribute 'state' failed on FlavorElement with flavor 'mozillaweb'. Failed to connect to an IPC Port: The system cannot find the file specified.

2014-02-24 13:04:28.1070|FATAL|Ranorex.Report|Getting attribute 'state' failed on FlavorElement with flavor 'mozillaweb'. System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.


Server stack trace:
at System.Runtime.Remoting.Channels.Ipc.IpcPort.Connect(String portName, Boolean secure, TokenImpersonationLevel impersonationLevel, Int32 timeout)
at System.Runtime.Remoting.Channels.Ipc.ConnectionCache.GetConnection(String portName, Boolean secure, TokenImpersonationLevel level, Int32 timeout)
at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Ranorex.Plugin.MozillaIpc.IMozillaDom.GetDocumentValue(IntPtr docWinRef, String name)
at Ranorex.Plugin.MozillaWebDocumentFlavorElement.GetAttributeValue(Element element, String name)
at Ranorex.Core.Element.GetAttributeValue(String name)
2014-02-24 13:04:28.1694|DEBUG|Ranorex.Report|Plugins: Getting attribute 'state' failed on FlavorElement with flavor 'mozillaweb'. Failed to connect to an IPC Port: The system cannot find the file specified.

2014-02-24 13:04:28.1694|FATAL|Ranorex.Report|Getting attribute 'state' failed on FlavorElement with flavor 'mozillaweb'. System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.

Also attaching the full file into this topic.

This is really frustrating since it used to work fine before.
Attachments
GPTester.zip
stacktrace
(73.99 KiB) Downloaded 116 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Getting attribute state failed on flavorelement error

Post by Support Team » Wed Feb 26, 2014 11:30 am

Hello Feroz,

Thank you for the description and the log file.
Is it possible to post a snapshot file of your application? Could it be that Firefox was updated automatically.
If you don't want to post the snapshot in the forum you can also send it to [email protected].
Additionally it would be very helpful to get more information about your test. Is it possible to provide a sample solution in order to analyze the issue in more detail?
Thank you.

Regards,
Bernhard
.
Image

fimo420
Posts: 55
Joined: Wed Jun 20, 2012 9:49 am

Re: Getting attribute state failed on flavorelement error

Post by fimo420 » Wed Feb 26, 2014 1:58 pm

Hi,

hmm i think i have found the problem.
The only difference between the working and non-working part of my code is that i added a webDocument.WaitForDocumentLoaded(); in my method.

If i remove that row everything works, i'm not sure why that single row would be a problem.
It's like i run a test for 100 iterations, after 50 working iterations the memory goes high and i have a check to restart the browser if memory is high. The next iteration starts fine, does half of the test without any problem but when it comes to my method where i have "webDocument.WaitForDocumentLoaded()" it stops.

After doing debugging by removing (new code that i added between working and non-working) row by row i came to conclusion that it is webDocument.WaitForDocumentLoaded();

Don't know why it is that part, anyone have a idea?
Now i have at least working test, but on some occasions some iterations fail due to page not loaded, that's why i had that WaitForDocumentLoaded.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Getting attribute state failed on flavorelement error

Post by Support Team » Fri Feb 28, 2014 4:00 pm

Hi Feroz,

Thank you for the information. Unfortunately I was not able to reproduce the issue. Is it possible to post a small sample solution in order to show me how to reproduce the issue on my machine.
Thank you!

Regards,
Bernhard
.
Image

fimo420
Posts: 55
Joined: Wed Jun 20, 2012 9:49 am

Re: Getting attribute state failed on flavorelement error

Post by fimo420 » Wed Mar 05, 2014 9:06 am

Hi Bernhard,

Can you try with firefox browser frontmotion?
http://www.frontmotion.com/Firefox/down ... efox.htm
This is a decision by our IT that we only use firefox frontmotion, and currently we have version 23.
If you still cannot reproduce i'll try to make a sample solution for you.

Br,
Feroz

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Getting attribute state failed on flavorelement error

Post by Support Team » Fri Mar 07, 2014 3:43 pm

Hi Feroz,

I tried to reproduce the issue using FrontMotion Firefox 23 and I was not able to reproduce the issue.
It would be very nice if you could provide a sample solution.
Thank you!

Regards,
Bernhard
.
Image