vuforiajs icon indicating copy to clipboard operation
vuforiajs copied to clipboard

Error while Posting new Target

Open ssuryakumar opened this issue 9 years ago • 6 comments

While posting new target , it throws error 'Fail'. Format of json is followed as per instructions. But Get operation works fine. Problem occurs only on creating new target

ssuryakumar avatar Aug 11 '15 14:08 ssuryakumar

Hi there, I haven 't used or tried the plugin recently. Feel free to contribute

pwasem avatar Aug 12 '15 16:08 pwasem

Sure Pwasem !

ssuryakumar avatar Aug 13 '15 03:08 ssuryakumar

@ssuryakumar did you resolve this ?

Sikandarkhan avatar Sep 30 '16 12:09 Sikandarkhan

@ssuryakumar @Sikandarkhan

I too had this issue. I scoured the documentation and finally got ahold of Vuforia support. There's nothing wrong with this library.

The Vuforia documentation for Adding a Target does not list image as a mandatory field.

screen shot 2018-02-28 at 3 18 52 pm

Guess what? It is. And make sure you base64encode it.

When attempting to add a target, you must follow the example in the README only application_metadata is not required.

var target = {

    // name of the target, unique within a database

    'name': 'my target',

    // width of the target in scene unit

    'width': 32.0,

    // the base64 encoded binary recognition image data

    'image': util.encodeFileBase64(__dirname + '/someImage.png'),

    // indicates whether or not the target is active for query

    'active_flag': true,

    // the base64 encoded application metadata associated with the target

    'application_metadata': util.encodeBase64('some metadata about your image')
};

It seems a little obvious but I've been stuck on this all day

kylerberry avatar Feb 28 '18 20:02 kylerberry

Hello, The module worked fine until a few months ago and now it shows 'Fail' when I post a new target. Name, width, image and active_flag are correct and nothing changed in my code.

I don't have any indications that Vuforia changed something in their VWS API.

Did someone have any clues ?

N7Nico avatar May 05 '21 08:05 N7Nico

Hello, i am trying to add an Image with addTarget() but I have the following issue : { result_code: 'Fail', transaction_id: '2009b98eeae94ec6afdaef5a22428963' } Moreover, I use postman to post a target directly on my route. Can somebody help me ?

CidChe avatar Mar 17 '22 17:03 CidChe