You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Nils Hügelmann (JIRA)" <ji...@apache.org> on 2011/04/18 01:50:05 UTC
[jira] [Created] (THRIFT-1150) List Deserialization with jQuery
doesnt work
List Deserialization with jQuery doesnt work
--------------------------------------------
Key: THRIFT-1150
URL: https://issues.apache.org/jira/browse/THRIFT-1150
Project: Thrift
Issue Type: Bug
Components: JavaScript - Library
Affects Versions: 0.6.1
Reporter: Nils Hügelmann
the following encoded data is properly processed when eval is used, but not when jQuery.parseJSON is active. (thrift.js line ~ 580)
{noformat}
[1,"Info",2,0,{"0":{"rec":{"1":{"str":"de1"},"2":{"lst":["rec",1,{"1":{"str":"dev"},"2":{"str":"78.46.113.59"},"3":{"i32":2080},"4":{"i32":1},"5":{"i32":0},"6":{"str":"de"}}]},"4":{"rec":{"1":{"str":"127.0.0.1"},"2":{"str":"--"}}}}}}]
{noformat}
thrift definition is
{noformat}
struct Info{
1: string defaultGateway,
2: list<Gateway> gateways,
3: optional string showURL,
4: ExternalInfo externalInfo
}
{noformat}
Error message is
TypeError: this.rstack[this.rstack.length - 1] is undefined
(thrift.js Line 662)
This may be related to https://issues.apache.org/jira/browse/THRIFT-815 ??
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1150) List Deserialization with jQuery
doesnt work
Posted by "Nils Hügelmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021313#comment-13021313 ]
Nils Hügelmann commented on THRIFT-1150:
----------------------------------------
I am using c# as server. I have made some tests:
{noformat}
struct foo{
1: string test1,
2: i32 test2,
3: i32 test3,
}
struct foo2{
1: string test1,
2: i32 test2
}
service tester{
list<foo> test1()
list<foo2> test2()
}
{noformat}
h3. test1 with all variables set
{noformat}
public List<foo> test1(){
return new List<foo> (){
new foo(){
Test1="s",
Test2=2,
Test3=3
}
};
}
{noformat}
->
{noformat}
[1,"test1",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":2},"3":{"i32":3}}]}}]
{noformat}
->
jQ: "this.rstack[this.rstack.length - 1] is undefined" / thrift.js 662
eval(): works
i dont know if this is related or known not to work, but i found the "skip not supported yet" exception.
This is a little confusing to me as the next test is just like the former one, without the last variable
h3. test2 with all variables filled
{noformat}
public List<foo2> test2(){
return new List<foo2> (){
new foo2(){
Test1="s",
Test2=2
}
};
}
{noformat}
->
{noformat}
[1,"test2",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":2}}]}}]
{noformat}
->
jQ: "skip not supported yet"
eval(): works
...which is exactly the same result as if i take test1 function and dont set the last variable
h3. test1 with only the first 2 variables set
{noformat}
public List<foo> test1(){
return new List<foo> (){
new foo(){
Test1="s",
Test2=22
}
};
}
{noformat}
->
{noformat}
[1,"test1",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":2}}]}}]
{noformat}
->
jQ: "skip not supported yet"
eval(): works
I could try and include it into the test suite, but it would take some time as i am currently fed up with bugs :-)
> List Deserialization with jQuery doesnt work
> --------------------------------------------
>
> Key: THRIFT-1150
> URL: https://issues.apache.org/jira/browse/THRIFT-1150
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6.1
> Reporter: Nils Hügelmann
>
> the following encoded data is properly processed when eval is used, but not when jQuery.parseJSON is active. (thrift.js line ~ 580)
> {noformat}
> [1,"Info",2,0,{"0":{"rec":{"1":{"str":"de1"},"2":{"lst":["rec",1,{"1":{"str":"dev"},"2":{"str":"78.46.113.59"},"3":{"i32":2080},"4":{"i32":1},"5":{"i32":0},"6":{"str":"de"}}]},"4":{"rec":{"1":{"str":"127.0.0.1"},"2":{"str":"--"}}}}}}]
> {noformat}
> thrift definition is
> {noformat}
> struct Info{
> 1: string defaultGateway,
> 2: list<Gateway> gateways,
> 3: optional string showURL,
> 4: ExternalInfo externalInfo
> }
> {noformat}
> Error message is
> TypeError: this.rstack[this.rstack.length - 1] is undefined
> (thrift.js Line 662)
> This may be related to https://issues.apache.org/jira/browse/THRIFT-815 ??
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (THRIFT-1150) List Deserialization with jQuery
doesnt work
Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Meier resolved THRIFT-1150.
---------------------------------
Resolution: Cannot Reproduce
Many issues with the JavaScript library are fixed, please open a new ticket with a test case if you still have that issue
> List Deserialization with jQuery doesnt work
> --------------------------------------------
>
> Key: THRIFT-1150
> URL: https://issues.apache.org/jira/browse/THRIFT-1150
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6.1
> Reporter: Nils Hügelmann
> Attachments: THRIFT-1150-qunit.patch
>
>
> the following encoded data is properly processed when eval is used, but not when jQuery.parseJSON is active. (thrift.js line ~ 580)
> {noformat}
> [1,"Info",2,0,{"0":{"rec":{"1":{"str":"de1"},"2":{"lst":["rec",1,{"1":{"str":"dev"},"2":{"str":"78.46.113.59"},"3":{"i32":2080},"4":{"i32":1},"5":{"i32":0},"6":{"str":"de"}}]},"4":{"rec":{"1":{"str":"127.0.0.1"},"2":{"str":"--"}}}}}}]
> {noformat}
> thrift definition is
> {noformat}
> struct Info{
> 1: string defaultGateway,
> 2: list<Gateway> gateways,
> 3: optional string showURL,
> 4: ExternalInfo externalInfo
> }
> {noformat}
> Error message is
> TypeError: this.rstack[this.rstack.length - 1] is undefined
> (thrift.js Line 662)
> This may be related to https://issues.apache.org/jira/browse/THRIFT-815 ??
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1150) List Deserialization with jQuery
doesnt work
Posted by "Nils Hügelmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025939#comment-13025939 ]
Nils Hügelmann commented on THRIFT-1150:
----------------------------------------
Firefox 4 (extension, chrome scope) + jQuery 1.5.2
> List Deserialization with jQuery doesnt work
> --------------------------------------------
>
> Key: THRIFT-1150
> URL: https://issues.apache.org/jira/browse/THRIFT-1150
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6.1
> Reporter: Nils Hügelmann
>
> the following encoded data is properly processed when eval is used, but not when jQuery.parseJSON is active. (thrift.js line ~ 580)
> {noformat}
> [1,"Info",2,0,{"0":{"rec":{"1":{"str":"de1"},"2":{"lst":["rec",1,{"1":{"str":"dev"},"2":{"str":"78.46.113.59"},"3":{"i32":2080},"4":{"i32":1},"5":{"i32":0},"6":{"str":"de"}}]},"4":{"rec":{"1":{"str":"127.0.0.1"},"2":{"str":"--"}}}}}}]
> {noformat}
> thrift definition is
> {noformat}
> struct Info{
> 1: string defaultGateway,
> 2: list<Gateway> gateways,
> 3: optional string showURL,
> 4: ExternalInfo externalInfo
> }
> {noformat}
> Error message is
> TypeError: this.rstack[this.rstack.length - 1] is undefined
> (thrift.js Line 662)
> This may be related to https://issues.apache.org/jira/browse/THRIFT-815 ??
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1150) List Deserialization with jQuery
doesnt work
Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025781#comment-13025781 ]
Henrique Mendonca commented on THRIFT-1150:
-------------------------------------------
Hi Nils, which browser and jQuery version do you use?
> List Deserialization with jQuery doesnt work
> --------------------------------------------
>
> Key: THRIFT-1150
> URL: https://issues.apache.org/jira/browse/THRIFT-1150
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6.1
> Reporter: Nils Hügelmann
>
> the following encoded data is properly processed when eval is used, but not when jQuery.parseJSON is active. (thrift.js line ~ 580)
> {noformat}
> [1,"Info",2,0,{"0":{"rec":{"1":{"str":"de1"},"2":{"lst":["rec",1,{"1":{"str":"dev"},"2":{"str":"78.46.113.59"},"3":{"i32":2080},"4":{"i32":1},"5":{"i32":0},"6":{"str":"de"}}]},"4":{"rec":{"1":{"str":"127.0.0.1"},"2":{"str":"--"}}}}}}]
> {noformat}
> thrift definition is
> {noformat}
> struct Info{
> 1: string defaultGateway,
> 2: list<Gateway> gateways,
> 3: optional string showURL,
> 4: ExternalInfo externalInfo
> }
> {noformat}
> Error message is
> TypeError: this.rstack[this.rstack.length - 1] is undefined
> (thrift.js Line 662)
> This may be related to https://issues.apache.org/jira/browse/THRIFT-815 ??
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (THRIFT-1150) List Deserialization
with jQuery doesnt work
Posted by "Nils Hügelmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021313#comment-13021313 ]
Nils Hügelmann edited comment on THRIFT-1150 at 4/18/11 10:22 PM:
------------------------------------------------------------------
I am using c# as server. I have made some tests:
{noformat}
struct foo{
1: string test1,
2: i32 test2,
3: i32 test3,
}
struct foo2{
1: string test1,
2: i32 test2
}
service tester{
list<foo> test1()
list<foo2> test2()
}
{noformat}
h3. test1 with all variables set
{noformat}
public List<foo> test1(){
return new List<foo> (){
new foo(){
Test1="s",
Test2=2,
Test3=3
}
};
}
{noformat}
->
{noformat}
[1,"test1",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":2},"3":{"i32":3}}]}}]
{noformat}
->
jQ: "this.rstack[this.rstack.length - 1] is undefined" / thrift.js 662
eval(): works
i dont know if this is related or known not to work, but i found the "skip not supported yet" exception.
This is a little confusing to me as the next test is just like the former one, without the last variable
h3. test2 with all variables filled
{noformat}
public List<foo2> test2(){
return new List<foo2> (){
new foo2(){
Test1="s",
Test2=2
}
};
}
{noformat}
->
{noformat}
[1,"test2",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":2}}]}}]
{noformat}
->
jQ: "skip not supported yet"
eval(): works
...which is exactly the same result as if i take test1 function and dont set the last variable
h3. test1 with only the first 2 variables set
{noformat}
public List<foo> test1(){
return new List<foo> (){
new foo(){
Test1="s",
Test2=22
}
};
}
{noformat}
->
{noformat}
[1,"test1",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":22}}]}}]
{noformat}
->
jQ: "skip not supported yet"
eval(): works
I could try and include it into the test suite, but it would take some time as i am currently fed up with bugs :-)
[EDIT] copy-pasted a wrong line
was (Author: nilshu):
I am using c# as server. I have made some tests:
{noformat}
struct foo{
1: string test1,
2: i32 test2,
3: i32 test3,
}
struct foo2{
1: string test1,
2: i32 test2
}
service tester{
list<foo> test1()
list<foo2> test2()
}
{noformat}
h3. test1 with all variables set
{noformat}
public List<foo> test1(){
return new List<foo> (){
new foo(){
Test1="s",
Test2=2,
Test3=3
}
};
}
{noformat}
->
{noformat}
[1,"test1",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":2},"3":{"i32":3}}]}}]
{noformat}
->
jQ: "this.rstack[this.rstack.length - 1] is undefined" / thrift.js 662
eval(): works
i dont know if this is related or known not to work, but i found the "skip not supported yet" exception.
This is a little confusing to me as the next test is just like the former one, without the last variable
h3. test2 with all variables filled
{noformat}
public List<foo2> test2(){
return new List<foo2> (){
new foo2(){
Test1="s",
Test2=2
}
};
}
{noformat}
->
{noformat}
[1,"test2",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":2}}]}}]
{noformat}
->
jQ: "skip not supported yet"
eval(): works
...which is exactly the same result as if i take test1 function and dont set the last variable
h3. test1 with only the first 2 variables set
{noformat}
public List<foo> test1(){
return new List<foo> (){
new foo(){
Test1="s",
Test2=22
}
};
}
{noformat}
->
{noformat}
[1,"test1",2,0,{"0":{"lst":["rec",1,{"1":{"str":"s"},"2":{"i32":2}}]}}]
{noformat}
->
jQ: "skip not supported yet"
eval(): works
I could try and include it into the test suite, but it would take some time as i am currently fed up with bugs :-)
> List Deserialization with jQuery doesnt work
> --------------------------------------------
>
> Key: THRIFT-1150
> URL: https://issues.apache.org/jira/browse/THRIFT-1150
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6.1
> Reporter: Nils Hügelmann
>
> the following encoded data is properly processed when eval is used, but not when jQuery.parseJSON is active. (thrift.js line ~ 580)
> {noformat}
> [1,"Info",2,0,{"0":{"rec":{"1":{"str":"de1"},"2":{"lst":["rec",1,{"1":{"str":"dev"},"2":{"str":"78.46.113.59"},"3":{"i32":2080},"4":{"i32":1},"5":{"i32":0},"6":{"str":"de"}}]},"4":{"rec":{"1":{"str":"127.0.0.1"},"2":{"str":"--"}}}}}}]
> {noformat}
> thrift definition is
> {noformat}
> struct Info{
> 1: string defaultGateway,
> 2: list<Gateway> gateways,
> 3: optional string showURL,
> 4: ExternalInfo externalInfo
> }
> {noformat}
> Error message is
> TypeError: this.rstack[this.rstack.length - 1] is undefined
> (thrift.js Line 662)
> This may be related to https://issues.apache.org/jira/browse/THRIFT-815 ??
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1150) List Deserialization with jQuery
doesnt work
Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henrique Mendonca updated THRIFT-1150:
--------------------------------------
Attachment: THRIFT-1150-qunit.patch
hm... it does work for me on firefox 3.6.16
please feel free to edit my test patch
> List Deserialization with jQuery doesnt work
> --------------------------------------------
>
> Key: THRIFT-1150
> URL: https://issues.apache.org/jira/browse/THRIFT-1150
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6.1
> Reporter: Nils Hügelmann
> Attachments: THRIFT-1150-qunit.patch
>
>
> the following encoded data is properly processed when eval is used, but not when jQuery.parseJSON is active. (thrift.js line ~ 580)
> {noformat}
> [1,"Info",2,0,{"0":{"rec":{"1":{"str":"de1"},"2":{"lst":["rec",1,{"1":{"str":"dev"},"2":{"str":"78.46.113.59"},"3":{"i32":2080},"4":{"i32":1},"5":{"i32":0},"6":{"str":"de"}}]},"4":{"rec":{"1":{"str":"127.0.0.1"},"2":{"str":"--"}}}}}}]
> {noformat}
> thrift definition is
> {noformat}
> struct Info{
> 1: string defaultGateway,
> 2: list<Gateway> gateways,
> 3: optional string showURL,
> 4: ExternalInfo externalInfo
> }
> {noformat}
> Error message is
> TypeError: this.rstack[this.rstack.length - 1] is undefined
> (thrift.js Line 662)
> This may be related to https://issues.apache.org/jira/browse/THRIFT-815 ??
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1150) List Deserialization with jQuery
doesnt work
Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021202#comment-13021202 ]
Roger Meier commented on THRIFT-1150:
-------------------------------------
Hi Nils, Thanks for finding and fixing bugs! ;-)
jQuery.parseJSON was introduced with THRIFT-1087
All current test cases at /lib/js/test/test.html pass... What server side do you use?
Could you provide a patch for the JavaScript test suite?
I would like to add that Testcase based on ThriftTest.thrift first.
> List Deserialization with jQuery doesnt work
> --------------------------------------------
>
> Key: THRIFT-1150
> URL: https://issues.apache.org/jira/browse/THRIFT-1150
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.6.1
> Reporter: Nils Hügelmann
>
> the following encoded data is properly processed when eval is used, but not when jQuery.parseJSON is active. (thrift.js line ~ 580)
> {noformat}
> [1,"Info",2,0,{"0":{"rec":{"1":{"str":"de1"},"2":{"lst":["rec",1,{"1":{"str":"dev"},"2":{"str":"78.46.113.59"},"3":{"i32":2080},"4":{"i32":1},"5":{"i32":0},"6":{"str":"de"}}]},"4":{"rec":{"1":{"str":"127.0.0.1"},"2":{"str":"--"}}}}}}]
> {noformat}
> thrift definition is
> {noformat}
> struct Info{
> 1: string defaultGateway,
> 2: list<Gateway> gateways,
> 3: optional string showURL,
> 4: ExternalInfo externalInfo
> }
> {noformat}
> Error message is
> TypeError: this.rstack[this.rstack.length - 1] is undefined
> (thrift.js Line 662)
> This may be related to https://issues.apache.org/jira/browse/THRIFT-815 ??
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira