Wrong parameter type 210 (AuthenticateRequest.Region): should be String but received Int32.

Options
Hi,

does anybody know what this error means?
I got this error when I try to reconnect after a disconnection

Thank you

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited October 2019
    Options
    Hi @Vasilis,

    As we explained before, you need to tell us which client SDK type and version you are using.
    Read more about how to get help here.
    Also posting on the right forum category may help.

    Otherwise, the error message itself is self-explanatory I think: the client is sending the region as integer instead of string.
  • Vasilis
    Vasilis
    edited October 2019
    Options
    Hi @JohnTube ,

    This is objective-c code. I am not setting the region. The region is set from the dashboard
  • Kaiserludi
    Options
    Hi @Vasilis.

    Please provide reproduction code of what exactly you are doing that causes this to happen.
  • Vasilis
    Options
    Hi @Kaiserludi,
    All I did was to disconnect, and then reconnect. I am sorry but I do not have any more info on this matter
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited October 2019
    Options
    Hi @Vasilis,

    The region is set from the dashboard
    From the dashboard you can set the list of whitelisted regions that the nameserver can return to the client in OpGetRegions. Each client can explicitly choose to connect a specific region. We have steps of how to choose the region at runtime for Objective-C Realtime client here.
  • Vasilis
    Options
    Hi @JohnTube,

    Exactly. I have set the whitelist regions, and nothing else.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Vasilis,

    Please share the code snippet of how you connect the Objective-C client to Photon Cloud so @Kaiserludi can have a look.
  • Vasilis
    Vasilis
    edited October 2019
    Options
    Hi @JohnTube .
    
    - (id) initWithOutputListener:(id<OutputListener>)listener
    {
        self = [super init];
        (mLogger=[[EGLogger alloc] initWithDebugOutputLevel:EGDbgLvl::OFF]).Listener = EGBase.Listener = self;
        mOutputListener = listener;
        mLoadBalancingClient=[[EGLoadBalancingClient alloc] initClient:self :appId :@"1.0" :ExitGames::Photon::ConnectionProtocol::DEFAULT :autoLobbyStats :regionSelectionMode];
        mLoadBalancingClient.DebugOutputLevel = EGDbgLvl::OFF;
    
        mStateAccessor = [StateAccessor new];
        mStateAccessor.State = STATE_INITIALIZING;
        mLastInput = INPUT_NON;
        
        return self;
    }
    
  • Kaiserludi
    Options
    Hi @Vasilis.

    You have provided the code that initializes the Client instance, but what @JohnTube has been asking for is the code that reconnects after a disconnection.
  • Vasilis
    Vasilis
    edited November 2019
    Options
    Hi @Kaiserludi,

    here is the code
    
    
    - (void) connectWithUserID:(NSString*)userID andUserName:(NSString*)userName
    {
        EGMutableAuthenticationValues* authenticationValues = [EGMutableAuthenticationValues authenticationValues];
        authenticationValues.UserID = userID;
        [mLoadBalancingClient connect:authenticationValues :userName];
        mLoadBalancingClient.TrafficStatsEnabled = true;
        mLastInput = INPUT_NON;
        mStateAccessor.State = STATE_CONNECTING;
    }
    
    
    - (void) reConnectWithUserID:(NSString*)userID andUserName:(NSString*)userName
    {
        mLastInput = INPUT_NON_ON_ERROR;
        [self connectWithUserID:userID andUserName:userName];
    }
  • Kaiserludi
    Kaiserludi admin
    edited November 2019
    Options
    Hi @Vasilis.

    You are setting mLastInput in reConnectWithUserID() and don' t access it again before in the very next line you call connectWithUserID(), which overrides the value that you have just set. That doesn't make sense.

    Aside from that I don't see anything in your code that should result in something like that and it works fine for me, so the cause must be elsewhere in your code.

    If you open demo_iMac_loadBalancing_objc and modify it slightly to set the state to STATE_INITIALIZED instead of to STATE_DISCONNECTED inside of disconnectReturn(), then it will disconnect and reconnect whenever you hit the '0' key.
    As you will see, the demo won't get the error that you have reported.

    Hence I suggest that you compare the differences between your project and that demo to track down the cause of the error.
  • Vasilis
    Options



    You are setting mLastInput in reConnectWithUserID() and don' t access it again before in the very next line you call connectWithUserID(), which overrides the values that you have just set. That doesn't make sense.

    :| That is really dumb. Thank you for pointing it out