Support #9584

Cannot send message

Added by Denis Pyriochos about 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:Sep 04, 2017
Priority:NormalDue date:
Assignee:Costantino Perciante% Done:

100%

Category:social-networking
Milestones:
Duration:

Description

Hi
I try to send a message.

I pass the recipients as a comma separated list, as per the documentation. In the log You may see the json passed, the 400-error received and the server response.

Based on that message I switched to construct recipients as a list. In the other log you may see the json passed, the 500-error received and the server response.

Please advice.

History

#1 Updated by Massimiliano Assante about 2 years ago

Have you tried https instead of http?

this base URL:

https://socialnetworking-d-d4s.d4science.org/social-networking-library-ws/rest/

instead of

http://socialnetworking-d-d4s.d4science.org:80/social-networking-library-ws/rest/

#2 Updated by Massimiliano Assante about 2 years ago

  • Status changed from New to In Progress

#3 Updated by Denis Pyriochos about 2 years ago

You are referring to the second json, I guess.

Unfortunately the log is the same.

FWIW

  • the same stands if i use user ids instead of emails
  • I can successfully post user messages

#4 Updated by Massimiliano Assante about 2 years ago

  • Assignee changed from Massimiliano Assante to Costantino Perciante

I think this is a Bug, @costantino.perciante@isti.cnr.it can you look at this?

#5 Updated by Costantino Perciante about 2 years ago

  • % Done changed from 0 to 100

Hi Denis, the body of the method should be something like this

{"subject": "....", "body": ".....", "recipients":[{"id":"userid1 or email1"},{"id":"userid2 or email2"}]}

I am pretty sure there was an example about it. I don't know why it disappeared (I've just added it back).
Pay also attention to the emails you use: they must be valid within the infrastructure (i.e registered/associated to someone in there).

Please let us know if it works now

#6 Updated by Denis Pyriochos about 2 years ago

  • Status changed from In Progress to Closed

Hey @costantino.perciante@isti.cnr.it :) This syntax is working fine. I tested with user ids and email, with http and https, they all work fine. Thx.

#7 Updated by Denis Pyriochos about 2 years ago

@costantino.perciante@isti.cnr.it pleas note that, although the message is send, the http request is still complaining:

[PORTAL] 35548249 [pool-8-thread-1] TRACE org.gcube.data.simulfishgrowthdata.util.SocialNetworkingExecutor - calling uri [http://socialnetworking-d-d4s.d4science.org:80/social-networking-library-ws/rest/2/messages/write-message]
[PORTAL] 35548296 [pool-8-thread-1] TRACE org.gcube.data.simulfishgrowthdata.util.SendMessageExecutor - posting ~~{"body":"Starting KPIs calculations on model [dp - Model test 2]. You will be notified as soon as they are completed","subject":"Calculating [dp - Model test 2]","recipients":[{"id":"denispyr"}]}~~
[PORTAL] 35549566 [pool-8-thread-1] TRACE org.gcube.data.simulfishgrowthdata.util.SocialNetworkingExecutor - status line is [HTTP/1.1 500 Internal Server Error]
[PORTAL] 35549566 [pool-8-thread-1] TRACE org.gcube.data.simulfishgrowthdata.util.SocialNetworkingExecutor - response is [{
  "success" : false,
  "message" : null,
  "result" : null
}]

I still receive a 500-error and a success:fail indicator. That is no problem on my part, as the messages are sent ok so I keep this issue closed :)

#8 Updated by Costantino Perciante about 2 years ago

You are right, it's not your side problem. We partially switched the workspace area (which also manages messages) in development environment. So if you are using it there, you could end up in troubles.

Of course, we will try to fix it asap.

Also available in: Atom PDF