Error with webhook - Attachment uploads

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
caine
Posts: 27
Joined: Thu Nov 18, 2021 2:22 pm

Error with webhook - Attachment uploads

Post by caine » Thu Nov 21, 2024 2:17 am

Up until very recently it was all working well.
Looks like maybe since the change in the mobile app/gallery views in the ui I've seen the issues.

- Webhook received with attachement ID

Code: Select all

{
  "ID": 1148026,
  "folderID": null,
  "attachmentID": "gfliDOIHd1kAH8lDjYu_YfQCzdixRQoQgHUIfB64s7w",
  "attachmentName": "image_20241121_125433_660.jpg",
  "companyID": 3
}
- Send a get request with the attachment ID to get the base64 data.

Code: Select all

https://xxx.simprosuite.com/api/v1.0/companies/3/jobs/1148026/attachments/files/gfliDOIHd1kAH8lDjYu_YfQCzdixRQoQgHUIfB64s7w?display=Base64
- Receiving an attachment not found error.

Code: Select all

{
  "errors": [
    {
      "path": null,
      "message": "Job attachment not found.",
      "value": null
    }
  ]
}
If I resend the request the attachment is found and gets downloaded.
I've now added a 30 second delay to the initial request and it seems to be working.
caine
Posts: 27
Joined: Thu Nov 18, 2021 2:22 pm

Re: Error with webhook - Attachment uploads

Post by caine » Thu Nov 21, 2024 3:47 am

Still breaks 5% of the time (or 100s of times per day) even with the 30sec delay.
Adjusted to loop and wait for the attachment to sync properly.
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: Error with webhook - Attachment uploads

Post by SimproAPITeam » Fri Nov 22, 2024 5:32 am

Interesting, could you share the build detail that are experiencing this problem to help with our investigation through PM?

Thanks!
Simpro API Team | Simpro Software Group
caine
Posts: 27
Joined: Thu Nov 18, 2021 2:22 pm

Re: Error with webhook - Attachment uploads

Post by caine » Thu Dec 12, 2024 6:23 am

Hi,

I've sent the requested details via PM but not received any reply.
Simpro support have suggest I come back here to ask for an update.
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: Error with webhook - Attachment uploads

Post by SimproAPITeam » Fri Dec 13, 2024 3:47 am

Hi caine,
We have replied to your private message regarding the attachments.

Regards
Simpro API Team | Simpro Software Group
caine
Posts: 27
Joined: Thu Nov 18, 2021 2:22 pm

Re: Error with webhook - Attachment uploads

Post by caine » Mon Dec 30, 2024 11:48 pm

Still facing issues with this.

Bug can be replicated easily:

Setup webhook for job attachments created.
Setup a trigger based on the webhook to send a GET request using the attachment ID that we were just told is available.
Upload an attachment via the mobile application. (WebUI attachments are not affected by the bug)

Webhook will trigger request to download the attachment.
Simpro will reply that the attachment does not exist and will continue replying this for up to a couple of minutes.

To fix - Don't send the webhook until the attachment is actually synced and available to view/download?
caine
Posts: 27
Joined: Thu Nov 18, 2021 2:22 pm

Re: Error with webhook - Attachment uploads

Post by caine » Tue Jan 14, 2025 10:37 pm

Hi,
Can we get an update if this is going to be looked into or fixed please?
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: Error with webhook - Attachment uploads

Post by SimproAPITeam » Wed Jan 22, 2025 4:25 am

Hi Caine,
This seems to be related to the mobile app rather than the API as data uploaded through Simpro and the API is returned as expected within a reasonable time.

I will gather the provided information and create a ticket so this can be investigated internally by the right teams.

Please report similar issues through our Simpro help desk in the future. This will help us triage correctly and assign issues to the right teams for faster responses. This will also ensure that you get reference number that can be referenced for future communication.

See more information here.
viewtopic.php?f=3&t=2675

Regards
Simpro API Team | Simpro Software Group
Post Reply