-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
warn: [Entity] Unknown entity type #19
Comments
that is what i added into entity.coffee (only for portals)
|
I had the same idea, but i didn't know the correct format and how to do this ;) Nice work btw :D I'll give it a try when i'm at home |
I have trouble merging your changes without a tool ;) I got an error with "main ->". Could you please post your new entity.coffee? Running "coffee:project" (coffee) task
|
my entity.coffee has a lot of other changes. |
I'm not that much into coffee.. I'm more into java and javascript. So i compiled the entitiy.js without remapping and added data = remap(data); manually.
I don't know why, but adding "data = remap data" to the entitiy.coffee always causes a compile error. If you have a lot of more changes in your entity.coffee, does that mean you're maintaining the project now? |
no, more like personal additions. P.S. dont forget to remap details response also |
What do you mean? I've added every change suggested by you without "data = remap data" and compiled the entity.js. Then i added "data = rempa(data);" to the entity.js. |
in order for details scan to work
|
The whole file with the applied diff: https://gist.github.com/sn0opy/37f0b1fe40f5cf6f5910 |
@sn0opy can you help me with this ? node build/app.js --debug true2015-01-27T18:37:36.710Z - info: [argv] --debug true /somedir/build/lib/requestfactory.js:13 |
Hi,
today i got these errors while runnig the script.
2015-01-13T19:24:23.094Z - warn: [Entity] Unknown entity type, id=xxxxxxxxxxxxxxxxxxxx, type=undefined
Entity.coffee contains the following code.
It seems it is the same prob iitc got three days ago:
10th January 2015
IITC 0.20.0 released. This is a critical update to fix loading of portals/links/fields after a protocol change by Niantic.
http://iitc.jonatkins.com/
Does anybody know how to fix this?
Edit:
I played a little bit with the js-Files and that is what i found:
Niantic changed the format of the "data".
request-portals.js
About line 282 i created some log entries:
Portal.
2015-01-13T20:22:55.743Z - info: ####: ID=58701dcc7c64422ca0b5ccbd2fc8fffd.16
2015-01-13T20:22:55.743Z - info: ####: TIMESTAMP=1417021375226
2015-01-13T20:22:55.743Z - info: ####: DATA=p,N,52566862,7593227,1,0,0,http://lh5.ggpht.com/bgyvgnnNqjflA6fgH_7TfJ_dxeDeoDS12zaL9L3azhFK9Qt67kOyAqQZklxNpOk7BHGsZeYdqBSUm-fWmP4tZw,Luna Park,
You can see, the "DATA" is now an array:
TYPE,FACTION,LAT,LNG,LEVEL,XM,RESONATOR-COUNT,PICTURE-URL,TITLE
Edge:
2015-01-13T20:26:05.741Z - info: ####: ID=647b7ba8c8224e88b835f5b26b78ebfd.9
2015-01-13T20:26:05.741Z - info: ####: TIMESTAMP=1421093566634
2015-01-13T20:26:05.741Z - info: ####: DATA=e,E,1025d2fa138143dcb61e8dcd87b46c2a.16,52716320,6767534,7e407a37512348be8f747429289810c5.16,52833075,6366633
Field:
2015-01-13T20:28:25.307Z - info: ####: ID=5e33289ce78a4d6c9b4c7de4f62ea931.b
2015-01-13T20:28:25.307Z - info: ####: TIMESTAMP=1420818476250
2015-01-13T20:28:25.307Z - info: ####: DATA=r,R,618813f6d82c4c6d810c729ddf6a6dcd.16,52527632,7196913,bc00081f51594dd8b8c4f432e43bb111.16,52443113,7091642,7a963deaf168482f884af9390f596658.16,52691670,7270650
entity.js:
I changed lines like data.type == 'portal' to data[0] === 'p'
In createPortalEntity i changed the calculation of lat lng and the if statement.
createPortalEntity = function(id, timestamp, data, callback) {
data[2] = data[2] / 1e6;
data[3] = data[3] / 1e6;
return createEntity('Portals', id, timestamp, data, function() {
if (data[1] !== 'N' && argv.detail !== 'false') {
return Entity.requestPortalDetail(id, function() {
return callback && callback('portal');
});
} else {
return callback && callback('portal');
}
});
};
Afterwards, the scripts calls the createEntity method:
createEntity = function(collection, id, timestamp, data, callback) {
data.time = timestamp;
return Database.db.collection(collection).update({
_id: id
}, {
$set: data
}, {
upsert: true
}, function(err) {
if (err) {
logger.error('[Entity] Failed to insert entity (id=%s) into database: %s', id, err.message);
}
return callback();
});
};
This causes this kind of error:
2015-01-13T20:28:25.300Z - error: [Entity] Failed to insert entity (id=8d20d05d599d4207af7cd41cae7f2391.9) into database: Invalid modifier specified: $set
I think "data" was in json and Database.db.collection could handle this, but it isn't anymore :(
I'm stuck and i don't know what to to next :(
Perhaps somebody can use my "work" ;) to fix this issue!
The text was updated successfully, but these errors were encountered: