If the application to register the title to land or to any interest therein is made by a nonresident of the state, he shall, in his petition, or in a separate paper to be filed in the case, give the name, residence, and post-office address of someone residing in the state, upon whom, as his agent, service of notice can be made in relation to any matter arising under or in connection with said application, and agree that such service on such agent shall have the same effect as if made on the applicant or owner personally within the state. Upon the death, removal, or incapacity of such agent for service, such nonresident shall appoint another in his stead and in default thereof the application may be dismissed.