MongooseIM version: 3.3.0
Installed from: https://github.com/esl/MongooseIM/tree/3.3.0
Erlang/OTP version: 20
Hi All,
When I try create XML as described for https://xmpp.org/extensions/xep-0060.html#impl-tempsub and send this XML:
<iq type='set'
from='tester2@localhost'
to='pubsub.localhost'
id='lease3'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscribe node='test_channel' jid='tester2@localhost'/>
<options node='test_channel' jid='tester2@localhost'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/pubsub#subscribe_options</value>
</field>
<field var='pubsub#expire'><value>2019-10-31T17:36:49.559220Z</value></field>
</x>
</options>
</pubsub>
</iq>
I get error:
18:04:48.342 [error] event=pubsub_crash,details=#{action => subscribe_node,class => throw,event => dirty_failed,node_name => <<"test_channel">>,pubsub_host => <<"pubsub.localhost">>,reason => {error,{invalid_ejson,{1572,543409,559220}}},stacktrace => [{jiffy,encode,2,[{file,"/home/vk/git-repo/mongooseim/_build/default/lib/jiffy/src/jiffy.erl"},{line,99}]},{mod_pubsub_db_rdbms,add_subscription,5,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/mod_pubsub_db_rdbms.erl"},{line,476}]},{node_flat,subscribe_node,8,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/node_flat.erl"},{line,183}]},{mod_pubsub,node_call,4,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/mod_pubsub.erl"},{line,4255}]},{mod_pubsub,'-db_call_fun/3-fun-0-',3,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/mod_pubsub.erl"},{line,4313}]},{mod_pubsub_db,'-extra_debug_fun/1-fun-0-',1,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/mod_pubsub_db.erl"},{line,191}]},{mongoose_rdbms,sql_dirty_internal,2,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/rdbms/mongoose_rdbms.erl"},{line,609}]},{mongoose_rdbms,run_sql_cmd,4,[{file,"/home/vk/mongooseim/_build/prod/lib/mongooseim/src/rdbms/mongoose_rdbms.erl"},{line,490}]}
Looks like the error provided from https://github.com/esl/MongooseIM/blob/3.3.0/src/pubsub/mod_pubsub_db_rdbms.erl#L487
As I see the value what was set to jiffy:encode/1 is [{expire,{1572,543409,559220}}], full code looks like:
...
EncodedOpts = jiffy:encode({[{expire,{1572,543409,559220}}]}),
...
Looks like is expected jiffy:encode({[{expire,1566309677755494}]}) instead of jiffy:encode({[{expire,{1572,543409,559220}}]}) or something similar with a suitable structure.
If you can, please take a look to this issue. Many thanks for your time.
P.S. When I set 1566309677755494 looks like the xep-0060.html#impl-tempsub still not working as expected, but maybe expected other data format.
Regards,
--V
MongooseIM version: 3.3.0
Installed from: https://github.com/esl/MongooseIM/tree/3.3.0
Erlang/OTP version: 20
Hi All,
When I try create XML as described for https://xmpp.org/extensions/xep-0060.html#impl-tempsub and send this XML:
I get error:
18:04:48.342 [error] event=pubsub_crash,details=#{action => subscribe_node,class => throw,event => dirty_failed,node_name => <<"test_channel">>,pubsub_host => <<"pubsub.localhost">>,reason => {error,{invalid_ejson,{1572,543409,559220}}},stacktrace => [{jiffy,encode,2,[{file,"/home/vk/git-repo/mongooseim/_build/default/lib/jiffy/src/jiffy.erl"},{line,99}]},{mod_pubsub_db_rdbms,add_subscription,5,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/mod_pubsub_db_rdbms.erl"},{line,476}]},{node_flat,subscribe_node,8,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/node_flat.erl"},{line,183}]},{mod_pubsub,node_call,4,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/mod_pubsub.erl"},{line,4255}]},{mod_pubsub,'-db_call_fun/3-fun-0-',3,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/mod_pubsub.erl"},{line,4313}]},{mod_pubsub_db,'-extra_debug_fun/1-fun-0-',1,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/pubsub/mod_pubsub_db.erl"},{line,191}]},{mongoose_rdbms,sql_dirty_internal,2,[{file,"/home/vk/git-repo/mongooseim/_build/prod/lib/mongooseim/src/rdbms/mongoose_rdbms.erl"},{line,609}]},{mongoose_rdbms,run_sql_cmd,4,[{file,"/home/vk/mongooseim/_build/prod/lib/mongooseim/src/rdbms/mongoose_rdbms.erl"},{line,490}]}Looks like the error provided from https://github.com/esl/MongooseIM/blob/3.3.0/src/pubsub/mod_pubsub_db_rdbms.erl#L487
As I see the value what was set to
jiffy:encode/1is[{expire,{1572,543409,559220}}], full code looks like:Looks like is expected
jiffy:encode({[{expire,1566309677755494}]})instead ofjiffy:encode({[{expire,{1572,543409,559220}}]})or something similar with a suitable structure.If you can, please take a look to this issue. Many thanks for your time.
P.S. When I set 1566309677755494 looks like the
xep-0060.html#impl-tempsubstill not working as expected, but maybe expected other data format.Regards,
--V