Tgcloud query call returns null

Hello team!
I’m puzzled at this, hopefully you’ll be able to spot something here.
My Angular program is calling for queries installed on TGCloud 3.4.0.
Here’s a typical call that returns the expected JSON object properly:

this.tgdb.runQuery("getPersonByDeviceId", {"keyDevice": this.device.uuid}).subscribe(
        res => {
          console.log('Obtained person by device id: ', JSON.stringify(res));

Now, here’s a call to a query that always returns null - WHY?

console.log('Calling getHelpersOfLearner with learnerId: ', this.learnerId);
    this.tgdb.runQuery("getHelpersOfLearner:", {"keyLearner": this.learnerId}).subscribe(
      res => {
        console.log('Got helpers of learner1: ', JSON.stringify(res));

Running this query in the Studio works fine:

The console shows I am passing the same valid keyLearner parameter:

In what circumstances would null be returned?
Since this is TGCloud I have no access to Logs to see more.

The DB is a dev DB with very little data, it runs very fast - no timeout here.

What am I missing?
Thanks!

@morsagmon I believe you should still be able to access the logs on the cloud in 3.4. Can you try the steps below. Might uncover some additional breadcrumbs.

Step1

Copy that query name to search in the Admin Portal. (Click on the top right ADMIN button)

Step 2

On the left side you can see I navigate to Monitor then clicked on Logs. After this paste in your query to the Pattern search box. To find results easier toggle off all and select RESTPP

Thank you, Jon!
Here’s a section I found related. I don’t think I understand all that’s happening here:

431111  W0510 09:49:23.718569  4840 zookeeper_watcher.cpp:97] Children data no update, watcher path: /tigergraph/dict/objects/__services/RESTPP/_command_nodes/RESTPP_1_1/_incoming_commands, type: 4
431112  I0510 09:49:23.725391 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 0, epoll_wait: 1, reused_request: 1
431113  I0510 09:49:23.725517 22782 requestrecord.cpp:345] ReturnResult|0|1652176163725ms|RESTPP|EndpointNotExist|user:|/query/SimplifyPilotADEV/getHelpersOfLearner:|keyLearner=L0972000547780994|238
431114  I0510 09:49:24.717619  4602 sys_utility.cpp:50] Engine_RESTPP_system_utility|Start unload .so file handler = 0x7f2f9e127100
431115  I0510 09:49:24.720779  4602 factory.cpp:300] Engine_worker|with ID 0 finished Factory::WaitAndRetire and returns
431116  I0510 09:49:25.249552 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431117  I0510 09:49:28.782200 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 0, epoll_wait: 1, reused_request: 1
431118  I0510 09:49:28.782307 22776 handler.cpp:306] RawRequest|,16777217.RESTPP_1_1.1652176168782.N,NNN,0,0,0,S|GET|endpoints?|async = 0|payload_data.size() = 0|api = v2
431119  I0510 09:49:28.782367 22776 handler.cpp:420] RequestInfo|,16777217.RESTPP_1_1.1652176168782.N,NNN,0,0,0,S|user:__INTERNAL_API__|api:v2|function:NoSchema|graph_name:SimplifyPilotADEV|libudf:
431120  I0510 09:49:28.786921 22776 requestrecord.cpp:345] ReturnResult|0|4ms|RESTPP|16777217.RESTPP_1_1.1652176168782.N|user:__INTERNAL_API__|endpoints|graph_id=3&graph_name=SimplifyPilotADEV|116199
431121  I0510 09:49:28.806355 27980 connectionpool.cpp:52] Engine_ConnectionPool|Accept new request with fd 58
431122  I0510 09:49:28.806386 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 1, epoll_wait: 0, reused_request: 0
431123  I0510 09:49:28.806490 22778 handler.cpp:306] RawRequest|,16842753.RESTPP_1_1.1652176168806.N,NNN,0,0,0,S|GET|statistics?seconds=60|async = 0|payload_data.size() = 0|api = v2
431124  I0510 09:49:28.806552 22778 handler.cpp:420] RequestInfo|,16842753.RESTPP_1_1.1652176168806.N,NNN,0,0,0,S|user:__INTERNAL_API__|api:v2|function:|graph_name:SimplifyPilotADEV|libudf:
431125  I0510 09:49:28.806794 22778 requestrecord.cpp:345] ReturnResult|0|0ms|RESTPP|16842753.RESTPP_1_1.1652176168806.N|user:__INTERNAL_API__|statistics|graph_id=3&graph_name=SimplifyPilotADEV&seconds=60|180
431126  I0510 09:49:30.250167 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431127  I0510 09:49:35.249747 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431128  I0510 09:49:40.249820 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431129  I0510 09:49:45.250041 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431130  I0510 09:49:50.250432 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431131  I0510 09:49:53.715618 22775 gsystem.cpp:385] System_GSystem|jemalloc purged 17
431132  I0510 09:49:55.250248 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431133  I0510 09:50:00.250329 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431134  I0510 09:50:05.250524 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431135  I0510 09:50:10.250535 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431136  I0510 09:50:15.250689 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431137  I0510 09:50:20.250737 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431138  I0510 09:50:23.719583 22775 gsystem.cpp:385] System_GSystem|jemalloc purged 17
431139  I0510 09:50:23.731119 27980 connectionpool.cpp:174] Engine_ConnectionPool|erase from epoll|63
431140  I0510 09:50:23.731143 27980 connectionpool.cpp:116] Engine_ConnectionPool|Event is not EPOLLIN, existing connection closed| fd = 63| events[0].events = 8209
431141  I0510 09:50:23.731148 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 0, epoll_wait: 1, reused_request: 0
431142  I0510 09:50:25.250902 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431143  I0510 09:50:28.781865 27980 connectionpool.cpp:52] Engine_ConnectionPool|Accept new request with fd 63
431144  I0510 09:50:28.781893 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 1, epoll_wait: 0, reused_request: 0
431145  I0510 09:50:28.782001 22780 handler.cpp:306] RawRequest|,16908289.RESTPP_1_1.1652176228781.N,NNN,0,0,0,S|GET|endpoints?|async = 0|payload_data.size() = 0|api = v2
431146  I0510 09:50:28.782063 22780 handler.cpp:420] RequestInfo|,16908289.RESTPP_1_1.1652176228781.N,NNN,0,0,0,S|user:__INTERNAL_API__|api:v2|function:NoSchema|graph_name:SimplifyPilotADEV|libudf:
431147  I0510 09:50:28.786033 22780 requestrecord.cpp:345] ReturnResult|0|4ms|RESTPP|16908289.RESTPP_1_1.1652176228781.N|user:__INTERNAL_API__|endpoints|graph_id=3&graph_name=SimplifyPilotADEV|116199
431148  I0510 09:50:28.799041 27980 connectionpool.cpp:174] Engine_ConnectionPool|erase from epoll|59
431149  I0510 09:50:28.799070 27980 connectionpool.cpp:116] Engine_ConnectionPool|Event is not EPOLLIN, existing connection closed| fd = 59| events[0].events = 8209
431150  I0510 09:50:28.799078 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 0, epoll_wait: 1, reused_request: 0
431151  I0510 09:50:28.806044 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 0, epoll_wait: 1, reused_request: 1
431152  I0510 09:50:28.806116 22782 handler.cpp:306] RawRequest|,16973825.RESTPP_1_1.1652176228806.N,NNN,0,0,0,S|GET|statistics?seconds=60|async = 0|payload_data.size() = 0|api = v2
431153  I0510 09:50:28.806205 22782 handler.cpp:420] RequestInfo|,16973825.RESTPP_1_1.1652176228806.N,NNN,0,0,0,S|user:__INTERNAL_API__|api:v2|function:|graph_name:SimplifyPilotADEV|libudf:
431154  I0510 09:50:28.806433 22782 requestrecord.cpp:345] ReturnResult|0|0ms|RESTPP|16973825.RESTPP_1_1.1652176228806.N|user:__INTERNAL_API__|statistics|graph_id=3&graph_name=SimplifyPilotADEV&seconds=60|360
431155  I0510 09:50:28.807842 27980 connectionpool.cpp:174] Engine_ConnectionPool|erase from epoll|58
431156  I0510 09:50:28.807870 27980 connectionpool.cpp:116] Engine_ConnectionPool|Event is not EPOLLIN, existing connection closed| fd = 58| events[0].events = 8209
431157  I0510 09:50:28.807876 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 0, epoll_wait: 1, reused_request: 0
431158  I0510 09:50:30.251610 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431159  I0510 09:50:35.251253 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431160  I0510 09:50:40.251431 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431161  I0510 09:50:45.251384 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431162  I0510 09:50:50.251466 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431163  I0510 09:50:53.724054 22775 gsystem.cpp:385] System_GSystem|jemalloc purged 17
431164  I0510 09:50:55.251760 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431165  I0510 09:51:00.252051 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431166  I0510 09:51:05.252010 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431167  I0510 09:51:10.252224 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431168  I0510 09:51:15.252159 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431169  I0510 09:51:20.252686 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431170  I0510 09:51:23.727993 22775 gsystem.cpp:385] System_GSystem|jemalloc purged 17
431171  I0510 09:51:25.252607 17793 gbrain_active_address_resolver.cpp:140] [RefreshGSE] leader info: parition = 1, replica = 1
431172  I0510 09:51:28.786022 27980 connectionpool.cpp:52] Engine_ConnectionPool|Accept new request with fd 58
431173  I0510 09:51:28.786052 27980 connectionpool.cpp:123] Engine_ConnectionPool| new_request: 1, epoll_wait: 0, reused_request: 0
431174  I0510 09:51:28.786134 22776 handler.cpp:306] RawRequest|,16777218.RESTPP_1_1.1652176288786.N,NNN,0,0,0,S|GET|endpoints?|async = 0|payload_data.size() = 0|api = v2
431175  I0510 09:51:28.786231 22776 handler.cpp:420] RequestInfo|,16777218.RESTPP_1_1.1652176288786.N,NNN,0,0,0,S|user:__INTERNAL_API__|api:v2|function:NoSchema|graph_name:SimplifyPilotADEV|libudf:
431176  I0510 09:51:28.792807 22776 requestrecord.cpp:345] ReturnResult|0|6ms|RESTPP|16777218.RESTPP_1_1.1652176288786.N|user:__INTERNAL_API__|endpoints|graph_id=3&graph_name=SimplifyPilotADEV|116199
431177  I0510 09:51:28.812842 27980 connectionpool.cpp:52] Engine_ConnectionPool|Accept new request with fd 59
431178  I0510 09:51:28.812875 27980 connectionpool.cpp:174] Engine_ConnectionPool|erase from epoll|63

OK, found the typo!
I’m passing “getHelpersOfLearner:” (with colon) instead of just the query name.
Probably copy-paste from a console.log statement.
How could I have missed it after staring at this code for so long…

1 Like