Error:Missing viewstate

Error:Missing viewstate

  

Hi,

I got an error today, it works fine before.who know what happened and what should I do ?


Hi Zhi,

If you can post the exception message that was logged ti Monitoring(Error Log)


cheers,
AlMokadem

Mohamed ElMokadem wrote:

Hi Zhi,

If you can post the exception message that was logged ti Monitoring(Error Log)


cheers,
AlMokadem

Here you go!



Hi Zhi,

I would say that we need more information than this to be able to help you (unless someone already encountered this before and Knows exactly what's the issue).

First thing, WHEN is this happening? What is the user action? Is he clicking a button? A link? WHAT is he trying to do? Reaching a new page? Submitting a form? With method submit or ajax submit? 

Second, what is the context? Is a Silk UI page/layout in a SilkUI themed application? What's the server stack and version? What's the browser?

Third, are you using plugins/widgets or your own JavaScript? What they do?

Fourth, there are no "ghosts". If it was working before, something changed. What was? Do you upgraded the platform? The server system? Has someone changed the code anyway? 

Have you tried to logout and login again (sometimes could be a session problem)? Have you the application all refreshed and ok? The environment health is ok?

As you can see, there are lots of things to have in mind and to check before we can understand the problem.

But, hopefully, someone knows what is happening and can help faster :)

Cheers

Eduardo Jauch


Hi Zhi Li,

As Eduardo explains there are many situations that can cause that error, usually the "Error deserializing viewstate" error is caused by someone that did a publish between the time you loaded the page and the time you tried clicking a button on the page.

Are you able to replicate the error?

Best regards.

Daniel Martins

Daniel Martins wrote:

Hi Zhi Li,

As Eduardo explains there are many situations that can cause that error, usually the "Error deserializing viewstate" error is caused by someone that did a publish between the time you loaded the page and the time you tried clicking a button on the page.

Are you able to replicate the error?

Best regards.

Daniel Martins


Hi Daniel Martins,


Yes, I can replicate this error , it happened every time when I click the button.

But the strange thing is when I trying to debug and put the breakpoint even at the very beginning, it never being triggered and will go to the error page directly, debugging console couldn't get any information.  

Eduardo Jauch wrote:

Hi Zhi,

I would say that we need more information than this to be able to help you (unless someone already encountered this before and Knows exactly what's the issue).

First thing, WHEN is this happening? What is the user action? Is he clicking a button? A link? WHAT is he trying to do? Reaching a new page? Submitting a form? With method submit or ajax submit? 

----it happens when I click the button, this button is using to extract data from database and do some operate on the data and then display the data on the page itself. it's using ajax submit.

Second, what is the context? Is a Silk UI page/layout in a SilkUI themed application? What's the server stack and version? What's the browser?

----I am using the default layout-Layout_London. and default outsystems set up, the browser is IE11.

Third, are you using plugins/widgets or your own JavaScript? What they do?

----I didn't run JavaScript in this function and didn't using any plugins/widgets.

Fourth, there are no "ghosts". If it was working before, something changed. What was? Do you upgraded the platform? The server system? Has someone changed the code anyway? 

----It did working fine yesterday, I didn't upgrade the server and platform , and I did some change today, after I hit this error, I rolled back the changes, but it still didn't work.

Have you tried to logout and login again (sometimes could be a session problem)? Have you the application all refreshed and ok? The environment health is ok?

----I tried even restart my pc and all the references refreshed already.

As you can see, there are lots of things to have in mind and to check before we can understand the problem.

But, hopefully, someone knows what is happening and can help faster :)

Cheers

Eduardo Jauch


Hi Eduardo,

Thanks for the detailed questions. Please see my inline reply.

Thanks. 


Zhi Li wrote:

Eduardo Jauch wrote:

Hi Zhi,

I would say that we need more information than this to be able to help you (unless someone already encountered this before and Knows exactly what's the issue).

First thing, WHEN is this happening? What is the user action? Is he clicking a button? A link? WHAT is he trying to do? Reaching a new page? Submitting a form? With method submit or ajax submit? 

----it happens when I click the button, this button is using to extract data from database and do some operate on the data and then display the data on the page itself. it's using ajax submit.

Second, what is the context? Is a Silk UI page/layout in a SilkUI themed application? What's the server stack and version? What's the browser?

----I am using the default layout-Layout_London. and default outsystems set up, the browser is IE11.

Third, are you using plugins/widgets or your own JavaScript? What they do?

----I didn't run JavaScript in this function and didn't using any plugins/widgets.

Fourth, there are no "ghosts". If it was working before, something changed. What was? Do you upgraded the platform? The server system? Has someone changed the code anyway? 

----It did working fine yesterday, I didn't upgrade the server and platform , and I did some change today, after I hit this error, I rolled back the changes, but it still didn't work.

Have you tried to logout and login again (sometimes could be a session problem)? Have you the application all refreshed and ok? The environment health is ok?

----I tried even restart my pc and all the references refreshed already.

As you can see, there are lots of things to have in mind and to check before we can understand the problem.

But, hopefully, someone knows what is happening and can help faster :)

Cheers

Eduardo Jauch


Hi Eduardo,

Thanks for the detailed questions. Please see my inline reply.

Thanks. 


It seems that your viewstate is corrupted. In that way you don't have valid server side information from the Client. Just a suggestion: Try to clean your browsers cache and see if it brings any result.


I found the root cause just now. 

This error is caused by Javascript. I put it in my preparation and the script is $("input").val(""). because I want to clear the data of all input widgets. 

After I change my script, it works fine now. I changed to $("input[type='text']").val(""). 


Thanks you guys so much for the prompt help.