Gracenote SDK: User not registered for online use - gracenote

I just downloaded Gracenote SDK and successfully built samples on Ubuntu but error appeared when I ran those samples:
ducpa1#101BacTT:~/gnsdk-3.07.7.3701o-20150714/samples/musicid_lookup_album_text$
./sample '34218515' '3B09794059618E8661874A4F544AE0AF' licfile.txt
'online'
GNSDK Product Version : 3.07.7.3701 (built 2015-07-14 12:37-0700)
Info: No stored user - this must be the app's first run.
error from: gnsdk_manager_locale_load() [on line 438] 0x90800168
User not registered for online use
Please note that I've already created an App on developer.gracenote.com and the above client information should be correct.
I also found a thread created for this issue but no answer was found.
stackoverflow.com/questions/31382774/gracenote-sdk-giving-error-user-not-registered-for-online-use
Could anyone give me suggestion in this case?

It seems you've created GnUser for local only but then later trying to use the same user for online.
Please delete the 'user.txt' file and try again so a new user for online can be created.
Comments from the sample code:
/* Creating a GnUser is required before performing any queries to Gracenote services,
* and such APIs in the SDK require a GnUser to be provided. GnUsers can be created
* 'Online' which means they are created by the Gracenote backend and fully vetted.
* Or they can be create 'Local Only' which means they are created locally by the
* SDK but then can only be used locally by the SDK.
*/
/* If the application cannot go online at time of user-regstration it should
* create a 'local only' user. If connectivity is available, an Online user should
* be created. An Online user can do both Local and Online queries.
*/

Related

Unable to set up Export Collections to BigQuery extension. Unable to uninstall: failed to remove IAM roles from Service Account

I tried installing the Export Collections to BigQuery extension to send firestore collection data to BigQuery. The installation succeeded but could never get the queries to work. I kept getting the error:
Not found: Dataset myproject:firestore_events was not found in location US
I tried uninstalling and reinstalling. I now have two instances of the extension and attempts to uninstall fail with ther error:
failed to remove IAM roles from Service Account for projects/myproject/instances/firestore-bigquery-export
Is there a way to uninstall manually?
Is there a way to install manually?
The following error message means that your FROM statement may not contain the proper query structure - project, database, and table:
Not found: Dataset myproject:firestore_events was not found in location US
For example:
SELECT *
FROM `my-project.my-database.my-table`
Please note the backticks.
Refer to Error: Not found: Dataset my-project-name:domain_public was not found in location US for details about a similar issue.
Now, in regards to the second error message:
failed to remove IAM roles from Service Account for projects/myproject/instances/firestore-bigquery-export
I suspect that after reinstalling and uninstalling one of the extension instances, its service account might already be deleted and thus failing to remove its IAM roles.
The installation of this extension generates a new service account that has the BigQuery Data Editor role to access your project and resources. This role allows the extension to configure and export data into BigQuery.
From documentation:
When you uninstall an extension from your project, Firebase deletes the service account created for that instance of the extension. After this deletion of the service account, the extension cannot run in your project because it no longer has any access rights to your project or data.
I was able to uninstall and reinstall the Export Collections to BigQuery extension to avoid duplicates in my project without any issues.
To answer your last question, I am not aware of any other methods to install/uninstall Firebase extensions other than what is shown in the documentation. You can install the extension using the Firebase Console or the Firebase CLI:
1 - Install the Firebase CLI or update it to the latest version:
npm install -g firebase-tools
2 - Install the extension:
firebase ext:install firestore-bigquery-export --project=projectId_or_alias
Edited
We can take the following steps to troubleshoot error:
failed to remove IAM roles from Service Account for projects
Please make sure that you're the owner of the project that you are installing extensions in.
Refer to this GitHub issue to uninstall the extension using the CLI.
If that didn't help, try disabling and re-enabling the Firebase Extensions API inside the GCP Console.
Please make sure that Firebase Management API is enabled in your project.
If that didn't help, navigate to the IAM Permissions page on the Cloud Console, and find the service account.
Add the Cloud Functions Developer and Firebase Extensions API Service Agent roles.
If those roles not available for some reason, just adding the Project Editor role also works as a catch-all. However, using the catch-all also provides additional permissions to the service accounts.
I had a similar issue when installing a Firebase Extension.
My error was adding an IAM role that did not exist, this not only failed to install the extension, but also then stopped me from uninstalling with the error failed to remove IAM roles from Service Account for.
To fix this issue I edited what I knew was the broken permission to be the correct role and then ran the following...
firebase ext:update ${ext-name} . --project={project-name}.
Alternativley, removing all roles completetly from the configuration and updating will have the same result.
One completed, the uninstallation process will automatically continue and uninstall your extension.

With valid App Registration, v4 BotFramework SDK Returning Unauthorized

I have been working with Kyle H. in Azure Support Chat and he recommended that I post this here.
Please be understanding, as I have read every related Stack Overflow post relevant and have exercised due diligence.
I have completely deleted and restarted both my Azure resources AND source code multiple times. Using this guide: https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-deploy-azure?view=azure-bot-service-4.0
The bot project is using the v4 template 'Echo'.
In Azure Portal, Test in Web Chat: "There was an error sending this message to your bot: HTTP status code Forbidden"
In Bot Emulator with ngrok configured: Cannot post activity. Unauthorized.
Following instructions here: https://learn.microsoft.com/en-us/azure/bot-service/bot-service-troubleshoot-authentication-problems?view=azure-bot-service-4.0#step-2
I ran: curl -k -X POST https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token -d "grant_type=client_credentials&client_id=b7404e9f-0e74-4174-aa4f-447fdd96d7f0&client_secret=REMOVED&scope=https%3A%2F%2Fapi.botframework.com%2F.default" and I am returned a valid access token.
I have confirmed multiple times that my app registration is using https, as well as the /api/messages route, and that my app service has the two keys MicrosoftAppId and MicrosoftAppPassword and they are set appropriately. Including stopping and starting and the restart functionality. I have also ensured that during deployment(VS 2017 Publish), it removes existing files.
My last attempt was to upgrade the template 'Echo' bot to .net core 2.2 - which deployed successfully. I again verified app id and app password set as described above, and unfortunately both the Bot Emulator and Test in Web Chat failed with the same errors.
Edit 1:
I used 'Create new resource' and picked the 'Web App Bot' template. I chose the 'Echo' bot. I chose 'Automatically Generate Application ID and Password' as well. This resulted in a bot deployment that did not have authorization errors. However, I noticed that instead of a 'Bot Channel Registration' resource - it instead created a 'Web App Bot'. When inspecting 'Application Settings', application ID and password aren't present, yet it functions just fine.
Edit 2:
I researched deeper, and learned that the 'Web App Bot' created in azure uses the botFilePath and botFileSecret application settings and likely keeps the app id and app password there.
Edit 3:
There is a huge difference between the v4 BotBuilder EchoBot template you use in visual studio when creating a new project and the EchoBot template used in Azure when creating a new resource. Narrowing it down now.
Edit 4:
I was able to use the Azure created web bot and modify it to continue my work. Was not possible with the Vsix templates even with ensuring app config and .bot file config were correct.
Edit 5:
I also learned that v4 doesn't support Microsoft Teams - and that was the entire purpose of my endeavor. v3 documentation is near nonexistent. So I think I'll be using an entirely different framework to integrate with Teams. I even attempted to implement: https://github.com/OfficeDev/BotBuilder-MicrosoftTeams-dotnet but my bot only responds with "Sorry, there was a problem encountered with your request" in Teams.
Edit 6:
I managed to get my bot functioning with Microsoft Teams, during the process solving the unauthorized error.
I created the Echo bot in Azure - and used App Studio in Microsoft Teams to add a manifest and add the bot to our team.
After that, I imported the project located here: https://github.com/OfficeDev/BotBuilder-MicrosoftTeams-dotnet/tree/master/CSharp/Samples/Microsoft.Bot.Builder.Teams.TeamEchoBot
Then I modified setup.cs to work with the encrypted .bot file, based on the source code that created the Echo Bot in Azure.
The VSIX templates are going to generate Startup code that uses the .bot file for appId/secret and, when deployed to Azure, is going to be looking for an endpoint named "production" which you would have had to add yourself to the default .bot file with the appid and secret from your provisioned bot.
For more details, check out this previous answer I gave on this topic .
If you are struggling to deploy your bot, I would recommend looking at this guide. The steps will walk you through creating a bot on Azure, and then you can download the source code, develop your bot, and redeploy it.
Glad I could help!

Check if the offline map available

I am working on an Android app with Here map sdk, and the MapLoader works fine for me to manage the offline maps, but in case of no network connection, how can I check if a specific map is installed or not ? Because in such case, the app can not retrieve the package lists anymore. Can the app check the device directly instead?
many thanks!
This is currently a limitation of the MapLoader API. It requires a data connection to retrieve the latest catalog. One suggestion is to store / serialize the MapPackageSelection in the application so you can keep the installation state.

Where can i find the link to my newly created app in firebase?

Im trying to locate the link that is supposed to be created along with my app on Firebase(according to the udacity Firebase course).
I found many links but none of them were accepted by the "after lesson quiz" on udacity.
The content that they have is according to the old UI of Firebase so i cant follow it step by step.
Unfortunately that course is for Firebase 2.x (www.firebase.com) and is out of date. In the legacy Firebase docs, under step 5 : Read & Write to your Firebase Database, you can see that creating a Firebase reference required the actual web address for you app. This is no longer true.
The new and correct way to setup your Firebase app does not require you to use this web address. The steps for setting up a Firebase app now are HERE.

how to use pre-populated database with tidesdk/titanium desktop

I'm in need of some help in developing a desktop application with a pre-populated database. I have tried numerous ways to get this working including those mentioned on both Tidesdk's API here http://tidesdk.multipart.net/docs/user-dev/generated/#!/api/Ti.Database.DB and at Titanium Desktops old API here http://developer.appcelerator.com/apidoc/desktop/latest/Titanium.Database-module.
While the later (using Titanium not Ti) works in creating a database in the apps directory it does not install my pre-populated sqlite database which is located in the resources file of my app.
A couple of my attempts located below
var db = Titanium.Database.openFile('test_db.sqlite', 'test_db');
var db = Titanium.Database.openFile(Ti.Filesystem.getFile(
Ti.Filesystem.getApplicationDataDirectory(), 'test_db.sqlite'));
var db = Ti.Database.open('test_db');
As stated most of these manage to create a database with the name given but when trying to run something as simple as a db.execute(SELECT) of something I know would exist in my pre-populated db I receive an error stating
Exception executing: SELECT name, id FROM people ORDER BY name COLLATE NOCASE, Error was: SQL Statement invalid or database missing
I have searched high and low for something to answer this but everyone continues to refer to the aforementioned API's or to the Mobile API's Ti.database.install() which does not work either.
Is it possible with titanium desktop to use a pre-populated sqlite database or do I have to populate it after I create it? If so any direction would be helpful (where to place the .sqlite file in the app and what functions to call).
I am currently using Titanium Studio with a titanium desktop osx SDK of 1.2.0.RC4 as requested by tidesdk.org until they have released there open source sdk.
Thanks in advance
This is possible, I just used this feature in a recent desktop app, deployed it successfully to Windows and Mac.
In my experience, sometimes your database file can be corrupted, for example if you use the Titanium.Database.install command, and it cant find the file to preload from (maybe the first time you specified the path wrong for instance), it will create the file itself, any subsequent install commands will not work because it already thinks this database has been installed.
Have you tried clearing out the application data? This is where titanium installs the database. For Mac this is in your /User/Library/Application Support/APPNAME directory. Their is a directory for databases, delete this and try again.
Also, this answer on Titanium Q&A may help, it talks about the process with the Mobile SDK but the Database stuff is the same.
Hope this helps!

Resources