Navigation

    brainCloud Forums
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Solved
    • Unsolved
    • Users
    • Groups
    1. Home
    2. Jonathan
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Jonathan

    @Jonathan

    Hey - Thanks for reaching out. I am here to help on brainCloud portal and integration related questions.

    2
    Reputation
    12
    Posts
    67
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website portal.braincloudservers.com/ Location Ottawa Age 31

    Jonathan Follow
    bitHeads brainCloud Global Moderator administrators

    Best posts made by Jonathan

    • RE: 'INVALID_TOKEN' When Sending Push Notifications

      Adding in, when we get an error using the device token, we remove it from memory on the brainCloud portal, to prevent spamming the system with bad tokens. So if you look under user Monitoring | User Monitoring | User Summary you won't see the deviceTokens on that profile (due to the error your reporting.)

      That said, your registration implementation and device token look fine. I don't think it's an issue with the token.

      So perhaps it's an issue with the cert?

      On the iCloud dashboard, I would check to ensure the cert used and uploaded with brainCloud had push notifications enabled.

      373168e8-de27-46b5-bb9e-eb0a659a3e77-image.png

      posted in Client APIs
      Jonathan
      Jonathan
    • RE: GetMyGroups never returns

      This error has been since resolved.

      A help article has been made on the groupType page: http://help.getbraincloud.com/en/articles/3272656-design-groups-group-types

      If experience similar problems to this forum topic with our Unity library, ensure brainCloud has been added to a gameObject, and that gameObject is not disabled.

      posted in Client APIs
      Jonathan
      Jonathan

    Latest posts made by Jonathan

    • RE: Award Achievement Issue

      Your code looks good, but awardAchievements takes an extra boolean parameter in cloud code, includeMetaData, which controls if the extra achievement metadata is returned in the json response.

      var includeMetaData = false;
      var achievementRes = gamificationService.awardAchievements(achievementIds, includeMetaData);
      

      The documentation will be updated to show the missing value.

      Thanks for reporting the issue.

      posted in Cloud Code
      Jonathan
      Jonathan
    • RE: Timeouts?

      If the app makes a call to brainCloud that timeouts, it will generate a CLIENT_NETWORK_ERROR_TIMEOUT (90001) error in the failure callback.

      _bc.EntityService.GetEntitiesByType(entityType,
          (string response, object cbObject) =>
          {
            Debug.Log("SUCCESS");
          },
          (int statusCode, int reasonCode, string statusMessage, object cbObject) =>
          {
            switch (reasonCode)
            {
      
              case ReasonCodes.CLIENT_NETWORK_ERROR_TIMEOUT:
                {
                  // Handle the timeout 
                  break;
                }
            }
          });
      
      

      The brainCloud SDK will timeout after a set interval. Currently, in the 4.2 release, the default is 35 seconds, but this may be adjusted later.

      You can also call SetPacketTimeouts to set a custom amount for your timeout values. But the defaults are recommended.

      An example of handling a timeout error in Unity can be found in our AuthenticationErrorHandling example.

      posted in Client APIs
      Jonathan
      Jonathan
    • RE: GetMyGroups never returns

      This error has been since resolved.

      A help article has been made on the groupType page: http://help.getbraincloud.com/en/articles/3272656-design-groups-group-types

      If experience similar problems to this forum topic with our Unity library, ensure brainCloud has been added to a gameObject, and that gameObject is not disabled.

      posted in Client APIs
      Jonathan
      Jonathan
    • RE: UpdateGroupEntityData doesn't update the "updatedAt" field.

      The fix will be going into the 4.2 patch on Tuesday. (Sept 17th) - now Wednesday Sept 18th.

      posted in Client API Defects
      Jonathan
      Jonathan
    • RE: UpdateGroupEntityData doesn't update the "updatedAt" field.

      Thanks for reporting the issue. A developer has been assigned the issue and is working on the fix. We will let you know when it's live 🙂

      posted in Client API Defects
      Jonathan
      Jonathan
    • RE: Getting names for request and invites to a group

      As an interim solution, you can add a cloud code script or a post-hook to retrieve the missing data, using the profileIds found in the request.

      https://getbraincloud.com/apidocs/apiref/#capi-friend-getsummarydataforprofileid

      
        ...
        "pendingMembers": {
          "382eb04f-f80c-4bfc-9a12-fca508cad476": { // <- These profile ids
            "role": "MEMBER",
            "attributes": {},
            "pendingReason": "ASKED_TO_JOIN"
          }
        }
        ...
      
      posted in Client APIs
      Jonathan
      Jonathan
    • RE: Getting names for request and invites to a group

      I am forwarding this to the devs to look into addressing.

      posted in Client APIs
      Jonathan
      Jonathan
    • RE: GetMyGroups doesn't return anything in requested

      Hey,

      The GetMyGroups will return the group requests and invites made to the current profile.

      As you noticed, to get the requests and invites made to a group (from other profiles), you need to use ReadGroup.

      This flow is working as intended. Groups and profiles are separate objects, and both can make invites and receive requests.

      So using GetMyGroups: here would be an example of a user that has made a group request, and has received a group invite.

      {  
         "data":{  
            "requested":[  
               {  
                  "groupType":"DiscussionGroup",
                  "groupId":"ad1ae126-d030-4d21-92c5-3e9d0b959647",
                  "memberCount":1,
                  "name":"Dark Roast",
                  "invitedPendingMemberCount":0,
                  "requestingPendingMemberCount":1,
                  "ownerId":"f86a20d4-51a3-4594-a5b0-90111bf55e6d",
                  "isOpenGroup":false
               }
            ],
            "invited":[  
               {  
                  "groupType":"DiscussionGroup",
                  "groupId":"b1d958e3-d196-45e2-9567-8efeb3296482",
                  "memberCount":1,
                  "name":"Local Coffee Shops",
                  "invitedPendingMemberCount":1,
                  "requestingPendingMemberCount":0,
                  "ownerId":"f86a20d4-51a3-4594-a5b0-90111bf55e6d",
                  "isOpenGroup":true
               }
            ],
            "groups":[  
      
            ]
         },
         "status":200
      }
      

      Hope that helps!

      posted in Client API Defects
      Jonathan
      Jonathan
    • RE: Modules/Common code scripts?

      You could also create a Global Property that houses your shared code.

      Properties can be set on the Design | Custom Config | Global Properties page.

      b9b4069f-603c-4d2b-aea5-ed58440ddc13-image.png

      function getFuzz() {
          return 'Fuzz';
      }
      
      function addTwoNums( a, b ) {
          return a + b;
      }
      

      And use the bridge to get the shared code via bridge.getGlobalProperty("sharedScripts").

      Example:

      var response = {};
      
      // First Load the shared scripts into a string object
      var sharedScripts = String(bridge.getGlobalProperty("sharedScripts"));
      
      // Output to the log - helps for debugging. Debug log is only written to when run from API explorer or CC editor
      bridge.logDebug("Loading shared code...", sharedScripts);
      
      // And now evaluate the functions so that they become part of the script.
      // Any errors in the code being evaluated will be reported as errors as if they
      // occurred in the script itself. This affects the line numbers the error is reported upon.
      eval(sharedScripts);
      
      // Now you can use any of the functions included...
      response.getFuzz = getFuzz();
      response.sum = addTwoNums( 5, 10 );
      
      response;
      

      This has been tested with up to 30k bytes of code.
      That said, isn't an officially sanctioned approach. We don't recommend putting more than 20-25kb in the shared code string.

      posted in Cloud Code
      Jonathan
      Jonathan
    • RE: Modules/Common code scripts?

      Unfortunately not really.

      You can call cloud code scripts from cloud code scripts (via the bridge.callScript() method).

      Otherwise, people have also just copied and pasted shared code at the top of their scripts.

      posted in Cloud Code
      Jonathan
      Jonathan