Cannot Register Device to a Channel

Hi,
I’m calling (iOS, Swift):

var userIdStrings = [String]()
for follow in follows {
userIdStrings.append("u\(follow.followUser?.objectId)")
}
Backendless.sharedInstance().messagingService.unregisterDevice()
if userIdStrings.count > 0{
Types.tryblock({ () -> Void in
let string = Backendless.sharedInstance().messagingService.registerDevice(userIdStrings)
print(string)
},
catchblock: { (exception) -> Void in
print("(FAULT): \(exception as! Fault)")
})
}

I get:

(FAULT): FAULT = '5010' [Can't find message channel with such name for the given application] <Can't find message channel with such name for the given application>

In the documentation is says:
If no channels are specified in the device registration call, Backendless registers the device with the default channel. If the device registration call references a non-existing channel, Backendless creates the channel and registers the device with it.
I’m trying to message followers of a user, so I create a channel for each user as suggested by Stanislav:
http://support.backendless.com/t/targeted-mass-push-notifications-query-limit-when-fetching-users
It worked for me (created new channels) just minutes ago.

Miroslav,

Could you please log the name of the channel before calling “registerDevice”? Let us know the value of it when it fails again, so we can try reproducing the problem with a specific value.

Regards,
Mark

Hi!

I’m not able to reproduce this issue.
Please send channel names (as Mark said) and your application id.

Thank you very much for support! It was my fault as the Ids contained unsupported characters (or was too long):

"uOptional(\"14C7EA0C-4A87-9DAC-FFB3-048D59DAA800\")", "uOptional(\"14C7EA0C-4A87-9DAC-FFB3-048D59DAA800\")", "uOptional(\"FEE919C2-3D3B-4E82-FF47-1CECFEB2B800\")"

It works for these:

["u14C7EA0C-4A87-9DAC-FFB3-048D59DAA800", 
"u14C7EA0C-4A87-9DAC-FFB3-048D59DAA800", 
"uFEE919C2-3D3B-4E82-FF47-1CECFEB2B800"]

Where the server also correctly identifies the duplicate.

AppId:

37C39F3D-2882-C028-FF2C-AE8B80842300

Works great, my bad.