uncaught error: set failed: value argument contains undefined in property 'playlist.3.genre' - firebase-realtime-database

Having an error where i need to add through bootsrap(form) objects on firebase. I converted elementTitle and elementGenre to see what will happen, and database on firebase puts element
element:[object undefined], in this case genre and title.Can someone explain why this happens.
Previously i didnt use js nor jquery, but now i need it for school. I hope you can see this image. By the way, we are using firebase version 8.10.
code plus firebase database.
Adding new object on firebase database.

Related

Code by Zapier - Input data field losing information when trying to execute code

I am using code by zapier, javascript.
I've used before and never had problems.
But today, as I am trying to create a new zap, I am reading data from trello and then trying to process the data with code by zapier.
I am filling data coming from trello in the field "Input Data", and then, trying to read the input data in my code using:
var cards = inputData['cards'].split(",");
The problem is that when I test the code, I receive an error:
TypeError: Cannot read property 'split' of undefined
When I go to check the Input Data field, it is losing the information.
Even if I type again, the Input Data information is not storing what I am asking there.
Any ideas?
Thank you
Amanda
Thank you everyone. I haven’t changed a thing.
I’ve tried in the next day with the same zap and that initial code that I posted.
Zapier was cleaning out the field with the data input from Trello (wasn’t detaining the value to pass to the next step).
Now it’s working. As I tried with different browsers on the same day and it was equally not working, I believe it was a bug that was fixed.

How to fix 'sqlite3' and other errors in CallKit Directory extension?

The idea of the app is to add around 50.000 contacts to the CallKit Directory, but when I try to add them with context.addIdentificationEntry(withNextSequentialPhoneNumber: contact.number, label: contact.contactLabel) in the beginRequest(with context: CXCallDirectoryExtensionContext) method i often either get a com.apple.CallKit.error.calldirectorymanager error 2 or some strange sqlite3 error:
sqlite3_step for query 'INSERT INTO PhoneNumberIdentificationEntry
(extension_id, phone_number_id, label_id) VALUES (?, (SELECT id
FROM PhoneNumber WHERE (number = ?)), (SELECT id FROM Label WHERE
(localized_label = ?))),
…
(SELECT id FROM Label WHERE (localized_label = ?)))' returned 19
(2067) errorMessage 'UNIQUE constraint failed:
PhoneNumberIdentificationEntry.extension_id,
PhoneNumberIdentificationEntry.phone_number_id,
PhoneNumberIdentificationEntry.label_id'
Generally I fetch the contacts from a server and try to keep them in sync - therefore, I save them locally with Realm. Has anyone ideas how to handle such errors?
Since I could not find much solutions to CallKit Directory errors, I tried to fix the errors by myself. It took me some time and to save some time for other developers I try to sum up all errors I got during the implementation of the CallKit Directory Extension with a suggested solution for each of them - I cannot guarantee that these solutions work for 100% but maybe they still can help!
sqlite3_step error: I often got the error when I tried to sync the contacts again, therefore I guess, that the error is some kind of duplicate error. Since it is possible that a contact has two numbers, I used the same name for both entries which basically worked, but I think there is still some kind of identification problem in the background if you use the exact same name for the label. Therefore, I added the index of each contact at the end of the label to keep them unique and now the error does not appear again anymore. (Even if all of your contacts have only one number keep in mind, that there are maybe some contacts with the same first and last name.)
com.apple.CallKit.error.calldirectorymanager error 2: This error appears often due to memory problems. Extension have much less memory available than the app itself (CallKit Directory Extension has for example only 12 MB available). To prevent this error I used a paging mechanism which always only loads a specific amount of contacts into the extension and then gets reloaded with the next page. If you use Realm there are additionally two aspects to consider: First, set the used object types in the Realm configuration Realm(configuration: Realm.Configuration(fileURL: realmFileURL, objectTypes: [ContactObject.self])) - this prevents Realm from calling objc_copyClassList() which needs a lot of memory. Second, if you filter the realm objects which a specific predicate try to avoid using any kind of references in the filter - for example, first, after adding the contact to the CallKit Directory, I passed the number of the contact to the filter of the realm objects to mark that contact as synced. But then I saw that the memory in the extension increased with each synced contact since there were probably some kind of references to the contact object. Then, I fetched the exact same page of contacts to mark them all as synced instead of fetching them one by one which allowed me to load much more contacts per page. Tip: If you want to use Breakpoints in the extension or want to debug the memory of the extension go in Xcode to Debug -> Attach to Process -> AppName Call Directory. Then you can select the call directory in the debug navigator and see the used amount of memory. (You can only attach to the extension process when it is currently used - just in case you can’t see it in the list)
com.apple.CallKit.error.calldirectorymanager error 3: The contact numbers are not ordered - order them before adding them to the directory.
com.apple.CallKit.error.calldirectorymanager error 4: Duplicated Entries - ensure to add a number only once.
Please do not hesitate to correct me if I am wrong with any of these suggestions or to add further tips and solutions - otherwise I am glad if I could help!
It seems like you're adding duplicate contacts. Just make sure the contacts you're adding are unique.

Umbraco upgrading from 7.4.3 to 7.6.1 Cannot insert duplicate key

Am trying to upgrade Umbraco from 7.4.3 to 7.6.1 and receiving the following error from the installer:
The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.umbracoNode' with unique index 'IX_umbracoNodeUniqueID'.
When I look in the umbracoNode table I can't find a row with the uniqueID shown in the error message.
Any else had this problem and found a way to fix it?
Many thanks
Edit:
So tried disabling the IX_umbracoNodeUniqueID constraint and instead got the following error:
The database failed to upgrade. ERROR: The database configuration
failed with the following message: There are no primary or candidate
keys in the referenced table 'umbracoNode' that match the referencing
column list in the foreign key 'FK_umbracoRedirectUrl'. Could not
create constraint.
Any further ideas?
UPDATE:
I did eventually get this to work. I created fresh install of 7.6.5 (Umbraco had moved on since I started this post) and then imported the "umbracoRedirectUrl" table into my original database from the clean install. That coupled with disabling the IX_umbracoNodeUniqueID index in the "UmbracoNode" table allowed the installation to complete. Once the install completed I tried to turn the index back on, which provided me with a more useful error message so I was able to track the node with duplicate uniqueIDs and manually delete. They appeared to related to a previous bug. Once I had removed them I was able to reactivate the IX_umbracoNodeUniqueID index.
Hope this is helpful to someone else.
Drop the index 'IX_umbracoNodeUniqueID'. I had the same issue and comparing my db to other Umbraco 7 dbs, this doesn't appear to be mandatory.
After I did this I got a separate error regarding a default scheme being missing, this was due to my DB user being set up wrong. If you do get this though, just change the default scheme of your user to 'dbo'.

Ruby on Rails: What is stale object and it's features?

In my application i got the error as con't update stale object. I don't know about this object. When it will create and why it was called a stale object. I want to know. Is it used in Only in ROR or other languges are also uses, this object and purpose?
According to the documentation:
http://api.rubyonrails.org/classes/ActiveRecord/StaleObjectError.html
Reason of Stale object exception is:
Record is stale when it's being saved in another query after instantiation, for example, when two users edit the same wiki page and one starts editing and saves the page before the other.
Solution: To avoid this exception use the locking system:
http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html
In my application multiple threads to be able to edit the same work -> version -> element record. its detecting error and raising the suitable error.
I typically did to handle the error:
I print a flash message such as "Sorry, please try after someone time, someone else editing this working version element".
element.lock_version = Document::Element.find(element.id).lock_version
element.save!
For example, such as detecting that one edit changed the element's type, where as the other edit changed the element's name by different creator, and then code of the two record should be merged done in one save.
In general, I used to element.reload to fetch a fresh version of the element.
worked fine!!

Metadata bug in Breeze 1.3.1? (Inheritence)

Trying out Breeze 1.3.1 and we've hit a problem. When trying to load the metadata, we get this error:
"Error: Metadata import failed for api/securitychart/Metadata; Unable to process returned metadata:Unable to locate a 'Type' by the name: Vehicle:#Project.Model.Entities"
Just for clarification, the entity "Vehicle" is the base type from which two other entities "Motorbike" and "Car" inherit.
We've digged up a bit through Breeze's code and found that the JSON returned from the ContextProvider.Metadata() method returns the array of entityTypes in the following order:
And the error pops out when trying to parse then entity data for Motorbike.
Without having much idea what was going on, we guessed that the base class Vehicle was not available when trying to parse the metadata for Motorbike, so we manipulated the array to let it process first the base class Vehicle. After doing this, this error no longer appears, but there's a different one: "bad navigation properties".
Can you guys please give us a clue about how to proceed from here?
Edit: As of v 1.3.2, this bug should be fixed. Please post back here to either confirm that it works or that you still have an issue.
Edit: Ok, this is a bug and will be fixed in the next release. And thanks for the repro metadata, it really helped.
Can you send me an email with the "broken" metadata ( the json returned from the server) at breeze.ideablade.com ( with Attn: Jay Traband somewhere in the email). and I'll try to get back to you as soon as possible.

Resources