Re: [Dev] Login and Logout error in Store

2016-02-22 Thread Dinusha Senanayaka
Hi Ayesha,

Issue came with logout operation, but host name was set to localhost.
Anyway, I updated jaggery.js version to latest (0.12.2) and issue seems to
be sorted with that. Thanks for checking.

Regards,
Dinusha.

On Mon, Feb 22, 2016 at 4:49 PM, Ayesha Dissanayaka  wrote:

> Hi Dinusha,
>
> jaggery 0.12.0 should be fine, since it has pretty much the same jaggery
> code content as of jaggery-0.11.2 which is used in greg-5.1.0.  However, we
> couldn't completely resolve the issues in some edge cases at
> login/logout[2] such as, accessing store/publisher with IP instead of
> domain name (ex:localhost) because of some constrains in identity
> components.
> Are you also getting above error in such scenario?
>
> [1]
> https://github.com/wso2/jaggery/compare/release-0.11.2...release-0.12.1?expand=1
> [2] G-Reg 5.1.0 code freeze keep delaying ? WAS { Re: Login and Logout
> error in Store}
>
> Thanks!
> -Ayesha
>
>
> On Mon, Feb 22, 2016 at 3:07 PM, Dinusha Senanayaka 
> wrote:
>
>> Hi Ayesha,
>>
>> Is there a released version available now with the above fix ? Getting
>> same issue in AppM with jaggery.js.feature-0.12.0.
>>
>> Regards,
>> Dinusha.
>>
>> On Wed, Oct 28, 2015 at 11:21 AM, Ayesha Dissanayaka 
>> wrote:
>>
>>> Hi,
>>>
>>> On Tue, Oct 27, 2015 at 5:53 PM, Manuranga Perera  wrote:
>>>

 add logic to check if instance of session object and set it to session
 obj if true else set to request obj

>>>
>>> Chanaka and myself tested this fix and it works as expected.
>>> Greg team will continue further testing the login/logout scenarios
>>> before releasing jaggery and jaggery-extension.
>>>
>>> Thanks!
>>> -Ayesha
>>>
>>>
>>> --
>>> *Ayesha Dissanayaka*
>>> Software Engineer,
>>> WSO2, Inc : http://wso2.com
>>> 
>>> 20, Palmgrove Avenue, Colombo 3
>>> E-Mail: aye...@wso2.com 
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Dinusha Dilrukshi
>> Associate Technical Lead
>> WSO2 Inc.: http://wso2.com/
>> Mobile: +94725255071
>> Blog: http://dinushasblog.blogspot.com/
>>
>
>
>
> --
> *Ayesha Dissanayaka*
> Software Engineer,
> WSO2, Inc : http://wso2.com
> 
> 20, Palmgrove Avenue, Colombo 3
> E-Mail: aye...@wso2.com 
>



-- 
Dinusha Dilrukshi
Associate Technical Lead
WSO2 Inc.: http://wso2.com/
Mobile: +94725255071
Blog: http://dinushasblog.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2016-02-22 Thread Ayesha Dissanayaka
Hi Dinusha,

jaggery 0.12.0 should be fine, since it has pretty much the same jaggery
code content as of jaggery-0.11.2 which is used in greg-5.1.0.  However, we
couldn't completely resolve the issues in some edge cases at
login/logout[2] such as, accessing store/publisher with IP instead of
domain name (ex:localhost) because of some constrains in identity
components.
Are you also getting above error in such scenario?

[1]
https://github.com/wso2/jaggery/compare/release-0.11.2...release-0.12.1?expand=1
[2] G-Reg 5.1.0 code freeze keep delaying ? WAS { Re: Login and Logout
error in Store}

Thanks!
-Ayesha


On Mon, Feb 22, 2016 at 3:07 PM, Dinusha Senanayaka 
wrote:

> Hi Ayesha,
>
> Is there a released version available now with the above fix ? Getting
> same issue in AppM with jaggery.js.feature-0.12.0.
>
> Regards,
> Dinusha.
>
> On Wed, Oct 28, 2015 at 11:21 AM, Ayesha Dissanayaka 
> wrote:
>
>> Hi,
>>
>> On Tue, Oct 27, 2015 at 5:53 PM, Manuranga Perera  wrote:
>>
>>>
>>> add logic to check if instance of session object and set it to session
>>> obj if true else set to request obj
>>>
>>
>> Chanaka and myself tested this fix and it works as expected.
>> Greg team will continue further testing the login/logout scenarios before
>> releasing jaggery and jaggery-extension.
>>
>> Thanks!
>> -Ayesha
>>
>>
>> --
>> *Ayesha Dissanayaka*
>> Software Engineer,
>> WSO2, Inc : http://wso2.com
>> 
>> 20, Palmgrove Avenue, Colombo 3
>> E-Mail: aye...@wso2.com 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Dinusha Dilrukshi
> Associate Technical Lead
> WSO2 Inc.: http://wso2.com/
> Mobile: +94725255071
> Blog: http://dinushasblog.blogspot.com/
>



-- 
*Ayesha Dissanayaka*
Software Engineer,
WSO2, Inc : http://wso2.com

20, Palmgrove Avenue, Colombo 3
E-Mail: aye...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2016-02-22 Thread Dinusha Senanayaka
Hi Ayesha,

Is there a released version available now with the above fix ? Getting same
issue in AppM with jaggery.js.feature-0.12.0.

Regards,
Dinusha.

On Wed, Oct 28, 2015 at 11:21 AM, Ayesha Dissanayaka 
wrote:

> Hi,
>
> On Tue, Oct 27, 2015 at 5:53 PM, Manuranga Perera  wrote:
>
>>
>> add logic to check if instance of session object and set it to session
>> obj if true else set to request obj
>>
>
> Chanaka and myself tested this fix and it works as expected.
> Greg team will continue further testing the login/logout scenarios before
> releasing jaggery and jaggery-extension.
>
> Thanks!
> -Ayesha
>
>
> --
> *Ayesha Dissanayaka*
> Software Engineer,
> WSO2, Inc : http://wso2.com
> 
> 20, Palmgrove Avenue, Colombo 3
> E-Mail: aye...@wso2.com 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Dinusha Dilrukshi
Associate Technical Lead
WSO2 Inc.: http://wso2.com/
Mobile: +94725255071
Blog: http://dinushasblog.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2015-10-27 Thread Udara Rathnayake
Hi Chandana,

On Tue, Oct 27, 2015 at 12:33 PM, Chandana Napagoda 
wrote:

> Hi Udara,
>
> Changing host name using carbon.xml will not work, since it will break the
> subscriptions and notifications.
>
> I have checked with Chanaka's fix, but it doesn't resolve the complete
> story. When user clicks on the Logout link in the Store, it still throws
> same exception I have pointed in my first mail.
>
Let's improve this fix then.

>
> Regards,
> Chandana
>
> On Tue, Oct 27, 2015 at 11:54 AM, Udara Rathnayake 
> wrote:
>
>> Hi Chandana,
>>
>> Please check whether we are shifting host name in this process, eg :- IP
>> to Host or vice versa.
>> If this is the problem we can avoid by using consistent host-name.
>>
> I mean not to update hostname within carbon.xml, but to use consistent
(hostname or IP) in URL while browsing.

>
>> Anyway noticed that Chanaka solving this issue by not using session to
>> store relaystate. Hope this will solve this problem.
>>
>> Regards,
>> UdaraR
>>
>>
>> On Tue, Oct 27, 2015 at 11:41 AM, Chandana Napagoda 
>> wrote:
>>
>>> Hi Udara,
>>>
>>> I am not clicking on "Go to Store" link shown in the publisher. Steps I
>>> am following are as below.
>>>
>>>- Go to Store URL and access it through anonymous mode.
>>>- Then access the Publisher URL in a different tab of the same
>>>browser.
>>>- Then log  into Publisher app and navigate to Store app which was
>>>already opened in a different tab.
>>>- Click "Signin" link.
>>>
>>> Also, please note that same behavior works fine with G-Reg 5.0.1 and
>>> 5.0.0 packs.
>>>
>>> Regards,
>>> Chandana
>>>
>>>
>>> On Mon, Oct 26, 2015 at 1:59 PM, Udara Rathnayake 
>>> wrote:
>>>
 Hi All,

 As we understood this happens only when we navigate to the store via
 "Go to Store" link which is provided by GREG extensions.
 Problem here is you are initially logging in to the publisher using
 hostname "localhost" and then redirect to the store using IP.

 In publisher.json you have defined  "storeUrl" : "%https.host%/store",
 you can avoid https.host and have it like "storeUrl" : "/store"

 So this is not due to any of the SSO related changes we have done
 recently(inorder to fix XSS/RFI issues).

 Regards,
 UdaraR


 On Sun, Oct 25, 2015 at 10:19 AM, Chandana Napagoda 
 wrote:

> Hi Udara,
>
> Here are the steps to reproduce this issue:
>
> 1). Unzip G-Reg 5.1.0-SNAPSHOT pack an start it.
> 2). Load Store and Publisher sites in the same browser, different tabs.
> 3). Login to the publisher and perform some operations.
> 4). Then navigate to Store tab and click on Signin link. Then a 500
> error page is displayed and an exception is thrown in the backend.
> 5). After that change the URL to "http://localhost:9443/store; which
> shows in logged in view.
> 6). Then click on the Signout link in the top right corner. Same 500
> error page is displayed and again an exception is thrown in the backend.
>
> Regards,
> Chandana
>
> On Sat, Oct 24, 2015 at 10:17 AM, Udara Rathnayake 
> wrote:
>
>> Hi Chandana,
>>
>> Had a look at this in a ES pack with all latest fixes done for
>> (jaggeryapps + jaggery-extensions[1]), But haven't face such issue. Let 
>> me
>> know the exact steps to reproduce.
>>
>> [1]
>> https://github.com/wso2/jaggery-extensions/commit/6a572c32de0b4f2ab9a1e52a3b5c62af5f7294a6
>>
>> Regards,
>> UdaraR
>>
>> On Sat, Oct 24, 2015 at 9:32 AM, Chandana Napagoda > > wrote:
>>
>>> Hi ES team,
>>>
>>> With the latest carbon store changes, we have noticed that if the
>>> very first logged in user first access the publisher and then login to
>>> store using SSO, an exception is logged. Further if user click on 
>>> logout,
>>> again another exception is logged. Is this errors occurring due to 
>>> recent
>>> SSO changes done in store side?
>>>
>>> Regards,
>>> Chandana
>>>
>>> --
>>> *Chandana Napagoda*
>>> Senior Software Engineer
>>> WSO2 Inc. - http://wso2.org
>>>
>>> *Email  :  chand...@wso2.com **Mobile :
>>> +94718169299 <%2B94718169299>*
>>>
>>> *Blog  :http://cnapagoda.blogspot.com
>>> *
>>>
>>>
>>
>
>
> --
> *Chandana Napagoda*
> Senior Software Engineer
> WSO2 Inc. - http://wso2.org
>
> *Email  :  chand...@wso2.com **Mobile :
> +94718169299 <%2B94718169299>*
>
> *Blog  :http://cnapagoda.blogspot.com
> *
>
>

>>>
>>>
>>> --
>>> *Chandana Napagoda*
>>> Senior Software Engineer
>>> WSO2 Inc. - http://wso2.org
>>>

Re: [Dev] Login and Logout error in Store

2015-10-27 Thread Udara Rathnayake
Hi Chandana,

Please check whether we are shifting host name in this process, eg :- IP to
Host or vice versa.
If this is the problem we can avoid by using consistent host-name.

Anyway noticed that Chanaka solving this issue by not using session to
store relaystate. Hope this will solve this problem.

Regards,
UdaraR


On Tue, Oct 27, 2015 at 11:41 AM, Chandana Napagoda 
wrote:

> Hi Udara,
>
> I am not clicking on "Go to Store" link shown in the publisher. Steps I am
> following are as below.
>
>- Go to Store URL and access it through anonymous mode.
>- Then access the Publisher URL in a different tab of the same browser.
>- Then log  into Publisher app and navigate to Store app which was
>already opened in a different tab.
>- Click "Signin" link.
>
> Also, please note that same behavior works fine with G-Reg 5.0.1 and 5.0.0
> packs.
>
> Regards,
> Chandana
>
>
> On Mon, Oct 26, 2015 at 1:59 PM, Udara Rathnayake  wrote:
>
>> Hi All,
>>
>> As we understood this happens only when we navigate to the store via "Go
>> to Store" link which is provided by GREG extensions.
>> Problem here is you are initially logging in to the publisher using
>> hostname "localhost" and then redirect to the store using IP.
>>
>> In publisher.json you have defined  "storeUrl" : "%https.host%/store",
>> you can avoid https.host and have it like "storeUrl" : "/store"
>>
>> So this is not due to any of the SSO related changes we have done
>> recently(inorder to fix XSS/RFI issues).
>>
>> Regards,
>> UdaraR
>>
>>
>> On Sun, Oct 25, 2015 at 10:19 AM, Chandana Napagoda 
>> wrote:
>>
>>> Hi Udara,
>>>
>>> Here are the steps to reproduce this issue:
>>>
>>> 1). Unzip G-Reg 5.1.0-SNAPSHOT pack an start it.
>>> 2). Load Store and Publisher sites in the same browser, different tabs.
>>> 3). Login to the publisher and perform some operations.
>>> 4). Then navigate to Store tab and click on Signin link. Then a 500
>>> error page is displayed and an exception is thrown in the backend.
>>> 5). After that change the URL to "http://localhost:9443/store; which
>>> shows in logged in view.
>>> 6). Then click on the Signout link in the top right corner. Same 500
>>> error page is displayed and again an exception is thrown in the backend.
>>>
>>> Regards,
>>> Chandana
>>>
>>> On Sat, Oct 24, 2015 at 10:17 AM, Udara Rathnayake 
>>> wrote:
>>>
 Hi Chandana,

 Had a look at this in a ES pack with all latest fixes done for
 (jaggeryapps + jaggery-extensions[1]), But haven't face such issue. Let me
 know the exact steps to reproduce.

 [1]
 https://github.com/wso2/jaggery-extensions/commit/6a572c32de0b4f2ab9a1e52a3b5c62af5f7294a6

 Regards,
 UdaraR

 On Sat, Oct 24, 2015 at 9:32 AM, Chandana Napagoda 
 wrote:

> Hi ES team,
>
> With the latest carbon store changes, we have noticed that if the very
> first logged in user first access the publisher and then login to store
> using SSO, an exception is logged. Further if user click on logout, again
> another exception is logged. Is this errors occurring due to recent SSO
> changes done in store side?
>
> Regards,
> Chandana
>
> --
> *Chandana Napagoda*
> Senior Software Engineer
> WSO2 Inc. - http://wso2.org
>
> *Email  :  chand...@wso2.com **Mobile :
> +94718169299 <%2B94718169299>*
>
> *Blog  :http://cnapagoda.blogspot.com
> *
>
>

>>>
>>>
>>> --
>>> *Chandana Napagoda*
>>> Senior Software Engineer
>>> WSO2 Inc. - http://wso2.org
>>>
>>> *Email  :  chand...@wso2.com **Mobile : +94718169299
>>> <%2B94718169299>*
>>>
>>> *Blog  :http://cnapagoda.blogspot.com
>>> *
>>>
>>>
>>
>
>
> --
> *Chandana Napagoda*
> Senior Software Engineer
> WSO2 Inc. - http://wso2.org
>
> *Email  :  chand...@wso2.com **Mobile : +94718169299
> <%2B94718169299>*
>
> *Blog  :http://cnapagoda.blogspot.com *
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2015-10-27 Thread Chandana Napagoda
Hi Udara,

Changing host name using carbon.xml will not work, since it will break the
subscriptions and notifications.

I have checked with Chanaka's fix, but it doesn't resolve the complete
story. When user clicks on the Logout link in the Store, it still throws
same exception I have pointed in my first mail.

Regards,
Chandana

On Tue, Oct 27, 2015 at 11:54 AM, Udara Rathnayake  wrote:

> Hi Chandana,
>
> Please check whether we are shifting host name in this process, eg :- IP
> to Host or vice versa.
> If this is the problem we can avoid by using consistent host-name.
>
> Anyway noticed that Chanaka solving this issue by not using session to
> store relaystate. Hope this will solve this problem.
>
> Regards,
> UdaraR
>
>
> On Tue, Oct 27, 2015 at 11:41 AM, Chandana Napagoda 
> wrote:
>
>> Hi Udara,
>>
>> I am not clicking on "Go to Store" link shown in the publisher. Steps I
>> am following are as below.
>>
>>- Go to Store URL and access it through anonymous mode.
>>- Then access the Publisher URL in a different tab of the same
>>browser.
>>- Then log  into Publisher app and navigate to Store app which was
>>already opened in a different tab.
>>- Click "Signin" link.
>>
>> Also, please note that same behavior works fine with G-Reg 5.0.1 and
>> 5.0.0 packs.
>>
>> Regards,
>> Chandana
>>
>>
>> On Mon, Oct 26, 2015 at 1:59 PM, Udara Rathnayake 
>> wrote:
>>
>>> Hi All,
>>>
>>> As we understood this happens only when we navigate to the store via "Go
>>> to Store" link which is provided by GREG extensions.
>>> Problem here is you are initially logging in to the publisher using
>>> hostname "localhost" and then redirect to the store using IP.
>>>
>>> In publisher.json you have defined  "storeUrl" : "%https.host%/store",
>>> you can avoid https.host and have it like "storeUrl" : "/store"
>>>
>>> So this is not due to any of the SSO related changes we have done
>>> recently(inorder to fix XSS/RFI issues).
>>>
>>> Regards,
>>> UdaraR
>>>
>>>
>>> On Sun, Oct 25, 2015 at 10:19 AM, Chandana Napagoda 
>>> wrote:
>>>
 Hi Udara,

 Here are the steps to reproduce this issue:

 1). Unzip G-Reg 5.1.0-SNAPSHOT pack an start it.
 2). Load Store and Publisher sites in the same browser, different tabs.
 3). Login to the publisher and perform some operations.
 4). Then navigate to Store tab and click on Signin link. Then a 500
 error page is displayed and an exception is thrown in the backend.
 5). After that change the URL to "http://localhost:9443/store; which
 shows in logged in view.
 6). Then click on the Signout link in the top right corner. Same 500
 error page is displayed and again an exception is thrown in the backend.

 Regards,
 Chandana

 On Sat, Oct 24, 2015 at 10:17 AM, Udara Rathnayake 
 wrote:

> Hi Chandana,
>
> Had a look at this in a ES pack with all latest fixes done for
> (jaggeryapps + jaggery-extensions[1]), But haven't face such issue. Let me
> know the exact steps to reproduce.
>
> [1]
> https://github.com/wso2/jaggery-extensions/commit/6a572c32de0b4f2ab9a1e52a3b5c62af5f7294a6
>
> Regards,
> UdaraR
>
> On Sat, Oct 24, 2015 at 9:32 AM, Chandana Napagoda 
> wrote:
>
>> Hi ES team,
>>
>> With the latest carbon store changes, we have noticed that if the
>> very first logged in user first access the publisher and then login to
>> store using SSO, an exception is logged. Further if user click on logout,
>> again another exception is logged. Is this errors occurring due to recent
>> SSO changes done in store side?
>>
>> Regards,
>> Chandana
>>
>> --
>> *Chandana Napagoda*
>> Senior Software Engineer
>> WSO2 Inc. - http://wso2.org
>>
>> *Email  :  chand...@wso2.com **Mobile :
>> +94718169299 <%2B94718169299>*
>>
>> *Blog  :http://cnapagoda.blogspot.com
>> *
>>
>>
>


 --
 *Chandana Napagoda*
 Senior Software Engineer
 WSO2 Inc. - http://wso2.org

 *Email  :  chand...@wso2.com **Mobile :
 +94718169299 <%2B94718169299>*

 *Blog  :http://cnapagoda.blogspot.com
 *


>>>
>>
>>
>> --
>> *Chandana Napagoda*
>> Senior Software Engineer
>> WSO2 Inc. - http://wso2.org
>>
>> *Email  :  chand...@wso2.com **Mobile : +94718169299
>> <%2B94718169299>*
>>
>> *Blog  :http://cnapagoda.blogspot.com *
>>
>>
>


-- 
*Chandana Napagoda*
Senior Software Engineer
WSO2 Inc. - http://wso2.org

*Email  :  chand...@wso2.com **Mobile : +94718169299*

*Blog  :http://cnapagoda.blogspot.com *

Re: [Dev] Login and Logout error in Store

2015-10-27 Thread Chandana Napagoda
Hi Udara,

I am not clicking on "Go to Store" link shown in the publisher. Steps I am
following are as below.

   - Go to Store URL and access it through anonymous mode.
   - Then access the Publisher URL in a different tab of the same browser.
   - Then log  into Publisher app and navigate to Store app which was
   already opened in a different tab.
   - Click "Signin" link.

Also, please note that same behavior works fine with G-Reg 5.0.1 and 5.0.0
packs.

Regards,
Chandana


On Mon, Oct 26, 2015 at 1:59 PM, Udara Rathnayake  wrote:

> Hi All,
>
> As we understood this happens only when we navigate to the store via "Go
> to Store" link which is provided by GREG extensions.
> Problem here is you are initially logging in to the publisher using
> hostname "localhost" and then redirect to the store using IP.
>
> In publisher.json you have defined  "storeUrl" : "%https.host%/store",
> you can avoid https.host and have it like "storeUrl" : "/store"
>
> So this is not due to any of the SSO related changes we have done
> recently(inorder to fix XSS/RFI issues).
>
> Regards,
> UdaraR
>
>
> On Sun, Oct 25, 2015 at 10:19 AM, Chandana Napagoda 
> wrote:
>
>> Hi Udara,
>>
>> Here are the steps to reproduce this issue:
>>
>> 1). Unzip G-Reg 5.1.0-SNAPSHOT pack an start it.
>> 2). Load Store and Publisher sites in the same browser, different tabs.
>> 3). Login to the publisher and perform some operations.
>> 4). Then navigate to Store tab and click on Signin link. Then a 500 error
>> page is displayed and an exception is thrown in the backend.
>> 5). After that change the URL to "http://localhost:9443/store; which
>> shows in logged in view.
>> 6). Then click on the Signout link in the top right corner. Same 500
>> error page is displayed and again an exception is thrown in the backend.
>>
>> Regards,
>> Chandana
>>
>> On Sat, Oct 24, 2015 at 10:17 AM, Udara Rathnayake 
>> wrote:
>>
>>> Hi Chandana,
>>>
>>> Had a look at this in a ES pack with all latest fixes done for
>>> (jaggeryapps + jaggery-extensions[1]), But haven't face such issue. Let me
>>> know the exact steps to reproduce.
>>>
>>> [1]
>>> https://github.com/wso2/jaggery-extensions/commit/6a572c32de0b4f2ab9a1e52a3b5c62af5f7294a6
>>>
>>> Regards,
>>> UdaraR
>>>
>>> On Sat, Oct 24, 2015 at 9:32 AM, Chandana Napagoda 
>>> wrote:
>>>
 Hi ES team,

 With the latest carbon store changes, we have noticed that if the very
 first logged in user first access the publisher and then login to store
 using SSO, an exception is logged. Further if user click on logout, again
 another exception is logged. Is this errors occurring due to recent SSO
 changes done in store side?

 Regards,
 Chandana

 --
 *Chandana Napagoda*
 Senior Software Engineer
 WSO2 Inc. - http://wso2.org

 *Email  :  chand...@wso2.com **Mobile :
 +94718169299 <%2B94718169299>*

 *Blog  :http://cnapagoda.blogspot.com
 *


>>>
>>
>>
>> --
>> *Chandana Napagoda*
>> Senior Software Engineer
>> WSO2 Inc. - http://wso2.org
>>
>> *Email  :  chand...@wso2.com **Mobile : +94718169299
>> <%2B94718169299>*
>>
>> *Blog  :http://cnapagoda.blogspot.com *
>>
>>
>


-- 
*Chandana Napagoda*
Senior Software Engineer
WSO2 Inc. - http://wso2.org

*Email  :  chand...@wso2.com **Mobile : +94718169299*

*Blog  :http://cnapagoda.blogspot.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2015-10-27 Thread Chanaka Jayasena
The initial issue Chandana has mentioned is fixed by the commit to acs.jag.

Now the issue is is with session.invalidate method. Following is the
exception. Tried to catch the exception from the session host object but
didn't work. Following is the stack trace.

[2015-10-27 17:35:39,036]  WARN
{org.jaggeryjs.scriptengine.util.HostObjectUtil} -  Session Object has been
reserved and cannot be instantiated by a script.
[2015-10-27 17:35:39,038] ERROR
{org.apache.catalina.session.StandardSession} -  Session event listener
threw exception
org.mozilla.javascript.WrappedException: Wrapped
org.jaggeryjs.scriptengine.exceptions.ScriptException: Session Object has
been reserved and cannot be instantiated by a script.
(/store/controllers/acs.jag#117)
at
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:392)
at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:343)
at org.mozilla.javascript.Context.newObject(Context.java:1504)
at
org.jaggeryjs.jaggery.core.listeners.WebAppSessionListener.sessionDestroyed(WebAppSessionListener.java:113)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:809)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:741)
at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1277)
at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:188)
at
org.jaggeryjs.hostobjects.web.SessionHostObject.jsFunction_invalidate(SessionHostObject.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
at
org.jaggeryjs.rhino.store.controllers.c3._c_anonymous_1(/store/controllers/acs.jag:117)
at
org.jaggeryjs.rhino.store.controllers.c3.call(/store/controllers/acs.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
at
org.jaggeryjs.rhino.store.controllers.c3._c_script_0(/store/controllers/acs.jag:20)
at
org.jaggeryjs.rhino.store.controllers.c3.call(/store/controllers/acs.jag)
at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at
org.jaggeryjs.rhino.store.controllers.c3.call(/store/controllers/acs.jag)
at
org.jaggeryjs.rhino.store.controllers.c3.exec(/store/controllers/acs.jag)
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:587)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:507)
at
org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
at
org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at

Re: [Dev] Login and Logout error in Store

2015-10-27 Thread Manuranga Perera
fix:
inSessionHostObject java class, in jsConstructor method, change

if (!(args[0] instanceof HttpServletRequest)) {
HostObjectUtil.getReservedHostObjectWarn(hostObjectName);
}

add logic to check if instance of session object and set it to session obj
if true else set to request obj




-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2015-10-27 Thread Ayesha Dissanayaka
Hi,

On Tue, Oct 27, 2015 at 5:53 PM, Manuranga Perera  wrote:

>
> add logic to check if instance of session object and set it to session obj
> if true else set to request obj
>

Chanaka and myself tested this fix and it works as expected.
Greg team will continue further testing the login/logout scenarios before
releasing jaggery and jaggery-extension.

Thanks!
-Ayesha


-- 
*Ayesha Dissanayaka*
Software Engineer,
WSO2, Inc : http://wso2.com

20, Palmgrove Avenue, Colombo 3
E-Mail: aye...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2015-10-26 Thread Udara Rathnayake
Hi All,

As we understood this happens only when we navigate to the store via "Go to
Store" link which is provided by GREG extensions.
Problem here is you are initially logging in to the publisher using
hostname "localhost" and then redirect to the store using IP.

In publisher.json you have defined  "storeUrl" : "%https.host%/store",  you
can avoid https.host and have it like "storeUrl" : "/store"

So this is not due to any of the SSO related changes we have done
recently(inorder to fix XSS/RFI issues).

Regards,
UdaraR


On Sun, Oct 25, 2015 at 10:19 AM, Chandana Napagoda 
wrote:

> Hi Udara,
>
> Here are the steps to reproduce this issue:
>
> 1). Unzip G-Reg 5.1.0-SNAPSHOT pack an start it.
> 2). Load Store and Publisher sites in the same browser, different tabs.
> 3). Login to the publisher and perform some operations.
> 4). Then navigate to Store tab and click on Signin link. Then a 500 error
> page is displayed and an exception is thrown in the backend.
> 5). After that change the URL to "http://localhost:9443/store; which
> shows in logged in view.
> 6). Then click on the Signout link in the top right corner. Same 500 error
> page is displayed and again an exception is thrown in the backend.
>
> Regards,
> Chandana
>
> On Sat, Oct 24, 2015 at 10:17 AM, Udara Rathnayake 
> wrote:
>
>> Hi Chandana,
>>
>> Had a look at this in a ES pack with all latest fixes done for
>> (jaggeryapps + jaggery-extensions[1]), But haven't face such issue. Let me
>> know the exact steps to reproduce.
>>
>> [1]
>> https://github.com/wso2/jaggery-extensions/commit/6a572c32de0b4f2ab9a1e52a3b5c62af5f7294a6
>>
>> Regards,
>> UdaraR
>>
>> On Sat, Oct 24, 2015 at 9:32 AM, Chandana Napagoda 
>> wrote:
>>
>>> Hi ES team,
>>>
>>> With the latest carbon store changes, we have noticed that if the very
>>> first logged in user first access the publisher and then login to store
>>> using SSO, an exception is logged. Further if user click on logout, again
>>> another exception is logged. Is this errors occurring due to recent SSO
>>> changes done in store side?
>>>
>>> Regards,
>>> Chandana
>>>
>>> --
>>> *Chandana Napagoda*
>>> Senior Software Engineer
>>> WSO2 Inc. - http://wso2.org
>>>
>>> *Email  :  chand...@wso2.com **Mobile : +94718169299
>>> <%2B94718169299>*
>>>
>>> *Blog  :http://cnapagoda.blogspot.com
>>> *
>>>
>>>
>>
>
>
> --
> *Chandana Napagoda*
> Senior Software Engineer
> WSO2 Inc. - http://wso2.org
>
> *Email  :  chand...@wso2.com **Mobile : +94718169299
> <%2B94718169299>*
>
> *Blog  :http://cnapagoda.blogspot.com *
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2015-10-24 Thread Chandana Napagoda
Hi Udara,

Here are the steps to reproduce this issue:

1). Unzip G-Reg 5.1.0-SNAPSHOT pack an start it.
2). Load Store and Publisher sites in the same browser, different tabs.
3). Login to the publisher and perform some operations.
4). Then navigate to Store tab and click on Signin link. Then a 500 error
page is displayed and an exception is thrown in the backend.
5). After that change the URL to "http://localhost:9443/store; which shows
in logged in view.
6). Then click on the Signout link in the top right corner. Same 500 error
page is displayed and again an exception is thrown in the backend.

Regards,
Chandana

On Sat, Oct 24, 2015 at 10:17 AM, Udara Rathnayake  wrote:

> Hi Chandana,
>
> Had a look at this in a ES pack with all latest fixes done for
> (jaggeryapps + jaggery-extensions[1]), But haven't face such issue. Let me
> know the exact steps to reproduce.
>
> [1]
> https://github.com/wso2/jaggery-extensions/commit/6a572c32de0b4f2ab9a1e52a3b5c62af5f7294a6
>
> Regards,
> UdaraR
>
> On Sat, Oct 24, 2015 at 9:32 AM, Chandana Napagoda 
> wrote:
>
>> Hi ES team,
>>
>> With the latest carbon store changes, we have noticed that if the very
>> first logged in user first access the publisher and then login to store
>> using SSO, an exception is logged. Further if user click on logout, again
>> another exception is logged. Is this errors occurring due to recent SSO
>> changes done in store side?
>>
>> Regards,
>> Chandana
>>
>> --
>> *Chandana Napagoda*
>> Senior Software Engineer
>> WSO2 Inc. - http://wso2.org
>>
>> *Email  :  chand...@wso2.com **Mobile : +94718169299
>> <%2B94718169299>*
>>
>> *Blog  :http://cnapagoda.blogspot.com *
>>
>>
>


-- 
*Chandana Napagoda*
Senior Software Engineer
WSO2 Inc. - http://wso2.org

*Email  :  chand...@wso2.com **Mobile : +94718169299*

*Blog  :http://cnapagoda.blogspot.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Login and Logout error in Store

2015-10-23 Thread Udara Rathnayake
Hi Chandana,

Had a look at this in a ES pack with all latest fixes done for (jaggeryapps
+ jaggery-extensions[1]), But haven't face such issue. Let me know the
exact steps to reproduce.

[1]
https://github.com/wso2/jaggery-extensions/commit/6a572c32de0b4f2ab9a1e52a3b5c62af5f7294a6

Regards,
UdaraR

On Sat, Oct 24, 2015 at 9:32 AM, Chandana Napagoda 
wrote:

> Hi ES team,
>
> With the latest carbon store changes, we have noticed that if the very
> first logged in user first access the publisher and then login to store
> using SSO, an exception is logged. Further if user click on logout, again
> another exception is logged. Is this errors occurring due to recent SSO
> changes done in store side?
>
> Regards,
> Chandana
>
> --
> *Chandana Napagoda*
> Senior Software Engineer
> WSO2 Inc. - http://wso2.org
>
> *Email  :  chand...@wso2.com **Mobile : +94718169299
> <%2B94718169299>*
>
> *Blog  :http://cnapagoda.blogspot.com *
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Login and Logout error in Store

2015-10-23 Thread Chandana Napagoda
Hi ES team,

With the latest carbon store changes, we have noticed that if the very
first logged in user first access the publisher and then login to store
using SSO, an exception is logged. Further if user click on logout, again
another exception is logged. Is this errors occurring due to recent SSO
changes done in store side?

Regards,
Chandana

-- 
*Chandana Napagoda*
Senior Software Engineer
WSO2 Inc. - http://wso2.org

*Email  :  chand...@wso2.com **Mobile : +94718169299*

*Blog  :http://cnapagoda.blogspot.com *
[2015-10-24 08:50:05,752] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} -  org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/store/controllers/acs.jag#97)
org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/store/controllers/acs.jag#97)
	at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
	at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
	at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:587)
	at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:507)
	at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
	at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
	at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
	at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
	at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
	at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (/store/controllers/acs.jag#97)
	at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
	at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
	at