Internal server error with id

Hello guys,

Today I tested my application chat and giving this error:

Backendless Console Browser:
“Internal server error with id F187B6C7-5135-6999-FF41-249847199F00”
app id is B98036D8-4C4B-8D51-FF42-E6C0E74CF800

The problem is with me?

Thank you.

Hi Evgeny,

Is it constantly appearing or appeared just once?

hello, it is constantly appearing and Data tab doesn’t open

Please try again, should be fixed now.

How did you remove the Recipient table?

Hi Evgeny,

Does your app have a table called “Recipient” ?

Regards,
Mark

Thank you!

Actually, this internal error appear after i tried to create “Message” table with recipient one-to-many relation(Also create with “Recipient” table)

But i suppose i dont need it for now

Thanks for help

Have you been creating these tables from console or by sending an object from your code? Was this request successful or returned an error?

The reason I’m asking is that we’re trying to find a way to reproduce this issue and then be able to fix it, in order to prevent it from happening again in the future.

I create from code.I was trying to create a recipient instance from Recepient Class and add it to Backendless, then create message instance from Message class (which has an array of recipient instances as a property) and add this to Backendless, but it failed with an error something like: FAULT = ‘Server.Processing’ [java.lang.RuntimeException: java.lang.RuntimeException

Can you please try the same request again and see if it fails again? But before that make sure that you have exactly the same set of tables you had the first time (if I understood you correctly, there was no Message table and no Recipient table).

Yes, but i can’t delete them

Why can’t you delete them? If this is a production app, you may create a new one and try your request there.

No, i didn’t see “delete” button, but it’s ok now.

I didn’t manage to recreate this error, the only thing that i get now is Internal server error with id 55328188-96AD-41B5-FF06-549967D1AF00 when i try to open Message table (it doesn’t open)
And i also has an error in code

FAULT = ‘Server.Processing’ [java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table ‘B98036D8-4C4B-8D51-FF42-E6C0E74CF800.Message.6CE92660-D68C-8D0A-FF6C-75E50DF58900’ doesn’t exist] <java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table ‘B98036D8-4C4B-8D51-FF42-E6C0E74CF800.Message.6CE92660-D68C-8D0A-FF6C-75E50DF58900’ doesn’t exist>

Seems that you recreated the Message table, didn’t you?

Yes, i recreate it.
And i found a bug in my code (i was sending nil in file column) and now everything is working - Message table is created and it has recepients with one-to-many relation.

Maybe you could send us some minimal part of your code, which could reproduce the issue, to support@backendless.com?

can i post it here? it is not a secret

Yes, sure you can. It even would be useful for other users :slight_smile:

func uploadMessage() {

        let data: NSData

        let fileName: String

        let fileType: String

        

        if image != nil {

           let newImage = resizeImage(image!)

            data = UIImageJPEGRepresentation(newImage, 0.5)!

            fileName = "image\( NSDate().timeIntervalSince1970).jpg"

            fileType = "image"

           

        } else {

            let url = NSURL(fileURLWithPath: videoFilePath!)

            data = NSData(contentsOfURL: url)!

            fileName = "video\( NSDate().timeIntervalSince1970).mov"

            fileType = "video"

        }

        

        backendless.fileService.upload(fileName, content: data, response: { (file) in

            var sendRecipientList = [Recipient]()

// Block that at first produced internal error

            for user in self.sendList {

                let recepient = Recipient()

                recepient.id = user.objectId

                recepient.name = user.name

                recepient.email = user.email

                sendRecipientList.append(recepient)

                

            }

            let message = Message(file: file, fileType: fileType, recipients: sendRecipientList, senderId: activeUser.objectId, senderName: activeUser.name)

// Block that at first produced internal error         

            let dataStore = backendless.data.of(Message.ofClass())

            dataStore.save(message, response: { (result) in

                print("message succkesfully sent")

                

                sendRecipientList.removeAll()

                self.clearImageVideoSendListAndNavigateToTabBarController(0)

                }, error: { (error) in

                    let title = NSLocalizedString("Try Again!", comment: "account success note title")

                    let message = NSLocalizedString("Please, capture a photo/video or pick one in photo library", comment: "account success message body")

                    print(error)

                    let cancelButtonTitle = NSLocalizedString("OK", comment: "OK")

                    

                    let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert)

                    let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .Cancel, handler: { (action) in

                        self.presentViewController(self.imagePicker, animated: false, completion: nil)

                    })

                    alert.addAction(cancelAction)

                    self.presentViewController(alert, animated: true, completion: {

                    })

            })




 

            }) { (error) in

                let title = NSLocalizedString("Oooops!", comment: "download failed")

                let message = NSLocalizedString(error.description, comment: "default message for blankField login error")

                let cancelButtonTitle = NSLocalizedString("OK", comment: "OK")

                let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert)

                let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .Cancel, handler: { (action) in

                    print(action)

                })

                alert.addAction(cancelAction)

                self.presentViewController(alert, animated: true, completion: {})

        }

        

    }



Hi Evgeny,

Thanks! Any chance you could attach the definitions of the Message and Recipient classes?

Regards,
Mark

class Message : NSObject { 
 
 
 
 var file : BackendlessFile 
 
 var fileType : String 
 
 var senderId: String 
 
 var senderName: String 
 
 var recepients: [BackendlessUser] 
 
 
 
 
 init (file: BackendlessFile, fileType: String, recepients: [BackendlessUser], senderId: String, senderName: String) { 
 
 self.file = file 
 
 self.fileType = fileType 
 
 self.recepients = recepients 
 
 self.senderId = senderId 
 
 self.senderName = senderName 
 
 } 
 
} 
class Recepient : NSObject { 
 
 var id : String? 
 var name : String? 
 var email: String? 
}