Software Archive
Read-only legacy content
17061 Discussions

Zero out the GUID causes an error

Nick_F_2
New Contributor III
877 Views

When I try to copy a project and use TextEditor to zero out the GUID in the XDK file I get the following error: -

Error opening project

Could not read /Users/me/Documents/XDK/MYAPPV4
In file /Users/me/Documents/XDK/MYAPPV4/MYAPPV4.xdk
Unexpected token “

The GUID is in the format: -

"projectGuid": “00000000-0000-0000-0000-000000000000”,

0 Kudos
10 Replies
Elroy_A_Intel
Employee
877 Views

The projectGuid value is a unique identifier associated to your user account for managing your projects. This value can not be all zeros. I recommend creating a Blank project and copying the desired project files into that new project.

0 Kudos
Anusha_M_Intel1
Employee
877 Views

@Nick, did you pick up the idea of zero-ing the GUID from the FAQs to create a duplicate of your project? 

I tried it and it imports fine. "projectGuid": "000000000-0000-0000-0000-000000000000",

Can you copy paste the above and try it? 

0 Kudos
Nick_F_2
New Contributor III
877 Views

Reply yes inof from FAQ's and a response from Paul (Intel) regarding copying a project.

It appears the error occurs when editing the file xdk file with textedit. When I use another program such as textwrangler all seems OK.

I have no idea what causes the error as the format looks good both before and after the edit when using textedit.

0 Kudos
Bernd_S_1
Beginner
877 Views

I too followed the FAQ suggestion to replace the GUID no. with zero (0) characters.

Did this with Windows Editor, then Adobe Dreamweaver's editor. Always "Unexpected token". See attachment.

XDK version is 2807.

Any ideas what token could be unexpected?

0 Kudos
Bernd_S_1
Beginner
877 Views

After several experiments without success and after comparing the original .xdk with the copied .xdk - without finding a difference -

I decided to just rename the folder of the copy and the .xdk, WITH the original untampered (no replacement with zeroes) GUID.

Intel XDK actually did "Open ... existing XDK project" without error.

Changed the App ID. I can edit, emulate and debug on my device.

But I suspect that I will run into trouble at the latest when I go to build the app.

So it would be nice to learn when and where from

the app will get a new (or different from the previous/copied project) projectGuid.

Obviously there a several files which contain the projectGuid and still the old app id which was replaced with a new app id in Build Settings. 

Would somebody know how to get a valid projectGuid when the suggested replacing the id with zeroes does not work?

Thanks in advance

 

0 Kudos
John_H_Intel2
Employee
877 Views

Can I ask what you are trying to do/gain/accomplish by editing the projectGuid to all zeros?

0 Kudos
Anusha_M_Intel1
Employee
877 Views

I think the text editor you are using might be inserting some junk characters. I have used sublime text and brackets without issue to change the GUID. The project GUID is auto generated by the import code when you import your project. Only the XDK can handle that. If there is already a GUID it doesn't do anything. If it is all zeroes, it gives it a new one. If it creates an xdk file from scratch, it also gives a new GUID. 

0 Kudos
Bernd_S_1
Beginner
877 Views

Re zeros: This comes solely from a FAQ I pasted here. Please see the last line below.

How do I make a copy of an existing Intel XDK project?

I...

If you want to use an existing project as the starting point of a new project in the Intel XDK. The process described below will insure that the build system does not confuse the ID in your old project with that stored in your new project. If you do not follow the procedure below you will have multiple projects using the same project ID (a special GUID that is stored inside the Intel XDK <project-name>.xdk file in the root directory of your project). Each project in your account must have a unique project ID.

  • Exit the Intel XDK.
  • Make a copy of your existing project using the process described above.
  • Inside the new project that you made (the copy of the old project), rename the <project-name>.xdk file and <project-name>.xdke files to something like project-copy.xdk and project-copy.xdke (anything you like, just something different than the original project, preferably the same name as the new project folder in which you are making this new project).
  • Using a TEXT EDITOR (only) (such as Notepad or Sublime or Brackets or some other TEXT editor), open the new "project-copy.xdk" file (whatever you named it) and find the line named projectGuid, it will look something like this:
    "projectGuid": "a863c382-ca05-4aa4-8601-375f9f209b67",
  • Change the "GUID" to all zeroes, like this: "00000000-0000-0000-000000000000"

 

0 Kudos
Nick_F_2
New Contributor III
877 Views

As i mentioned previously textedit was causing issues, but text wrangler for the MAC was fine, so it does appear that the editor is critical to this.

0 Kudos
Bernd_S_1
Beginner
877 Views

Anusha M. (Intel) wrote:

I think the text editor you are using might be inserting some junk characters. I have used sublime text and brackets without issue to change the GUID. The project GUID is auto generated by the import code when you import your project. Only the XDK can handle that. If there is already a GUID it doesn't do anything. If it is all zeroes, it gives it a new one. If it creates an xdk file from scratch, it also gives a new GUID. 

Thanks a lot. I just could not believe that the Adobe Dreamweaver editor caused similar trouble as the Windows Editor.

I installed Brackets (Adobe too) and managed to get it right, with the zeroes and XDK replacing the zeroes with a new GUID.

Great!

 

Thanks again

0 Kudos
Reply