Uploaded image for project: 'Mobile App'
  1. Mobile App
  2. MOBILEAPP-9

set-notifications-prefs requires the token in the request

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.0.0
    • 1.0.0
    • None
    • None
    • 4.4 M5

      At this time this method requires the token in the parameters of the request. Without I get a 401.

      When I give the token in parameters I get an error 500

      Caused by: java.lang.NullPointerException
      	at org.apache.xml.serializer.ToStream.writeAttrString(ToStream.java:2105)
      	at org.apache.xml.serializer.ToStream.processAttributes(ToStream.java:2085)
      	at org.apache.xml.serializer.ToStream.closeStartTag(ToStream.java:2643)
      	at org.apache.xml.serializer.ToStream.characters(ToStream.java:1409)
      	at org.apache.xalan.transformer.TransformerIdentityImpl.characters(TransformerIdentityImpl.java:1126)
      	at org.apache.cocoon.xml.XMLUtils.data(XMLUtils.java:324)
      	at org.apache.cocoon.xml.XMLUtils.createElement(XMLUtils.java:527)
      	at org.ametys.plugins.core.impl.userpref.JdbcXmlUserPreferencesStorage._getPreferencesXmlBytes(JdbcXmlUserPreferencesStorage.java:386)
      	at org.ametys.plugins.core.impl.userpref.JdbcXmlUserPreferencesStorage.setUserPreferences(JdbcXmlUserPreferencesStorage.java:218)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.ametys.runtime.plugin.component.PluginsComponentManager$ComponentInvocationHandler.invoke(PluginsComponentManager.java:177)
      	at com.sun.proxy.$Proxy36.setUserPreferences(Unknown Source)
      	at org.ametys.core.userpref.UserPreferencesManager.setUserPreferences(UserPreferencesManager.java:213)
      	at org.ametys.plugins.mobileapp.UserPreferencesHelper.setNotificationSettings(UserPreferencesHelper.java:321)
      	at org.ametys.plugins.mobileapp.UserPreferencesHelper.setNotificationSettings(UserPreferencesHelper.java:285)
      	at org.ametys.plugins.mobileapp.action.SetNotificationsPrefsAction.doAction(SetNotificationsPrefsAction.java:75)
      	at org.ametys.plugins.mobileapp.action.AbstractLoggedAction.act(AbstractLoggedAction.java:54)
      	at org.ametys.plugins.mobileapp.action.SetNotificationsPrefsAction.act(SetNotificationsPrefsAction.java:34)
      	at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:125)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
      

      The request was

      http://mstlucemobileapp-site.ironman.anyware.corp/_plugins/mobileapp/1/intranet/set-notifications-prefs?token=dXRpbGlzYXRldXJzI2ZyYXZldGllciNjMlptZUNtbXBYRWREdklpQ0R2dFZSTUc5aUdqRkRVWm1JWjI1VlV1V3l3cFBLc2tMcm9xTnBkUVg2a1pWVk5q

      With in the body

      {
        "token": "tokenforexpo",
        "language": "fr",
        "feeds": [
          {
            "feed_id": "query://cde2ad78-ccd2-42c3-94ab-a93e8e23445b"
          }    
        ],
        "workspaces": {
          "types": [
            {
              "type": "documents"
            }
          ],
          "projects": [      
          ]
        }
      }
      

      Please let me know about the token what is required ?

            Unassigned Unassigned
            fravetier Frederic Ravetier (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: